Inquiry Dialogue

Index

Items:
OnLuaButton_InquiryAbout InquiryDropList InquiryTextBox
InquiryNumberBox CheckRegistryString CheckRegistryInt
InquiryYesNo InquiryPathBox  
     
     
 

Name:

OnLuaButton_InquiryAbout(Name, Version)

Example:

Code:

function OnLuaButton_InquiryAbout() 
 --[[
     Drop list for user to input project info
     Caller = local y = InquiryDropList("Easy Euro Hinge Maker", "Select Cabinet Style", 290, 165, IniFile)
     Dialog Header = "Easy Euro Hinge Maker"
     User Question = "Select Cabinet Style"
     Selection Array = IniFile
     Returns = True
]]
  local myHtml = [[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> 
                  <meta content = "text/html ; charset = iso-8859-1" http-equiv = "Content-Type"> <title>Layer Names</title> 
                  <style type = "text/css"> html { overflow: auto ; } body, td, th { font-family: Arial, Helvetica, sans-serif ; 	
                  font-size: 12px ; color: #000 ; background-color: #EBEBEB ; } .FormButton { font-weight: bold ; width: 40% ; 
                  font-family: Arial, Helvetica, sans-serif ; 	font-size: 12px ; } .h1 { font-size: 16px ; font-weight: bold ; 
                  text-align:center ; text-wrap:none ; 	vertical-align:middle ; } .h2 { font-size: 10px ; text-align:center ; 
                  text-wrap:none ; vertical-align:middle ; } .h3 { font-size: 12px ; font-weight: bold ; text-align:center ;
                  text-wrap:none ; vertical-align:middle ; } </style> </head> <body bgcolor = "#EBEBEB" text = "#000000"> 
                  <table width="213" border="0" cellpadding="0"> <tr> <td align="center" nowrap="nowrap" class="h1" id="Name">
                  Easy Euro Hinge Maker</td> </tr> <tr> <td align="center" nowrap="nowrap" class="h2" id="version"> Version 1.2 </td>  
                  </tr> <tr> <td align="center" nowrap="nowrap"><hr></td> </tr> <tr> 
                  <td align="center" nowrap="nowrap" class="h3">James Anderson</td> </tr> <tr> 
                  <td align="center" nowrap="nowrap"><a href="http://www.jimandi.com">www.JimAndi.com</a> </td> </tr> <tr> 
                  <td align="center" nowrap="nowrap"> <span class="h3">(281) 728-3028  </span> </td> </tr> <tr> 
                  <td align="center" nowrap="nowrap"> <span class="h3">Houston, TX.</span> </td> </tr> <tr> 
                  <td align="center" nowrap="nowrap"> <hr> </td> </tr> <tr> 
                  <td width="30%" align="center" style = "width: 15%">
                  <input id = "ButtonOK" class = "FormButton" name = "ButtonOK" type = "button" value = "OK"> </td> </tr> 
                  </table> </body> </html>]] ;           
-- =========================================================================
local dialogA = HTML_Dialog(true, myHtml, 250, 235, "About") ; 
      dialogA:AddLabelField("Name", Hinge.Name) ; 
      dialogA:AddLabelField("Version", "Version " .. Hinge.Version) ; 
      dialogA:ShowDialog() 
return  true
end
 

Name:

InquiryDropList(Header, Quest, XX, YY, DList)

Example:

Code:

function InquiryDropList(Header, Quest, XX, YY, DList)
--[[
  Drop list foe user input
  local days = {"Sunday", "Monday", "Tuesday", "Wednesday",    "Thursday", "Friday", "Saturday"}
  Caller: local y = InquiryDropList("Cabinet Maker", "Select Cabinet Style", 290, 165, days)
  Dialog Header = "Cabinet Maker"
  User Question = "Select Cabinet Style"
  Selection Array = IniFile
  Returns = String
]]
  local myHtml = [[<!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
               <html> <head> <meta content = "text/html; charset = iso-8859-1" http-equiv = "Content-Type"> 
               <title>Cabinet Maker and Tool-path Creator</title> <style type = "text/css"> html { overflow: auto } 
               body, td, th { font-family: Arial, Helvetica, sans-serif font-size: 10px color: #000; } 
               .FormButton { font-weight: bold; width: 100%; font-family: Arial, Helvetica, sans-serif font-size: 12px; } 
                .h1 { font-size: 14px; font-weight: bold; } .h2 { font-size: 12px; font-weight: bold; } .h3 
               { font-size: 10px; font-weight: bold; } </style> </head> <body bgcolor = "#EBEBEB" text = "#000000"> 
                <table width = "248" border = "0" cellpadding = "0"> <tr> 
                <td colspan = "3" align = "left" valign = "middle" bgcolor = "#EBEBEB" class = "h1"  id = "Questions">
                <strong class = "h2">Message Here</strong></td> </tr> <tr> 
                <th width = "20%" height = "15" align = "right" valign = "middle" bgcolor = "#EBEBEB" id = "Questions2"> </th>
                <th width = "60%" height = "15" align = "center" valign = "middle" bgcolor = "#EBEBEB" id = "Contact2"> 
                <select name = "DList" size = "10" class = "h2" id = "ListBox"> <option>Defalt</option> </select> </th> 
                <th width = "20%" height = "15" align = "left" valign = "middle" bgcolor = "#EBEBEB" id = "Contact2">
                </th> </tr> <tr> <th height = "10" colspan = "3" align = "right" valign = "middle" bgcolor = "#EBEBEB" 
                id = "QuestionID"> </th> </tr> <tr> 
                <td colspan = "3" align = "center"  valign = "middle" bgcolor = "#EBEBEB"><table border = "0" width = "100%"> 
                <tr align = "right"> <td style = "width: 40%"><span style = "width: 40%"> 
                <input id = "ButtonCancel" class = "FormButton"  name = "ButtonCancel" type = "button" value = "Cancel"> 
                </span></td> <td style = "width: 20%"></td> <td style = "width: 40%"><span style = "width: 40%"> 
                <input id = "ButtonOK" class = "FormButton" name = "ButtonOK" type = "button" value = "OK"> </span></td> 
                </tr> </table></td> </tr> </table> </body> </html> ]] ; 
-- =========================================================================
local dialog = HTML_Dialog(true, myHtml, XX, YY, Header) ;  
   dialog:AddLabelField("Questions", Quest) ; 
   dialog:AddDropDownList("ListBox", "DEFAULT") ;     
   dialog:AddDropDownListValue("ListBox", "DEFAULT") ; 
   for index, value in pairs(DList) do ; 
      dialog:AddDropDownListValue("ListBox", value) ; 
   end ; 
   if not dialog:ShowDialog() then ; 
    return "." ; 
   else ; 
    return string.upper(dialog:GetDropDownListValue("ListBox")) ; 
   end 
end
 

Name:

InquiryTextBox(Header, Question, DefaltN)

Example:

Code:

function InquiryYesNo(Header, Quest, DefaltN)
--[[
    Drop list for user to input project info
    Caller = local y = InquiryDropList("JimAndi Cabinet Maker", "Select Cabinet Style", 290, 165, IniFile)
    Dialog Header = "JimAndi Cabinet Maker"
    User Question = "Select Cabinet Style"
    Selection Array = IniFile
    Returns = String
]]
  local myHtml = [[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> 
                   <meta content = "text/html; charset = iso-8859-1" http-equiv = "Content-Type"> 
                   <title>Project Information</title> <style type = "text/css">html { overflow: auto; } body, td, th 
                   {font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000; background-color: #EBEBEB;
                    }.FormButton{font-weight: bold; width: 60%;font-family: Arial, Helvetica, sans-serif;
                    font-size: 12px; } .h2 { font-size: 12px; font-weight: bold; text-align:left;
                    text-wrap:none ; vertical-align:middle;} </style> </head> <body bgcolor = "#EBEBEB" text = "#000000"> 
                    <table width="400" border="0" align="left" cellpadding="0"> <tr> 
                    <td colspan="3" align="left" valign="middle" nowrap class="h2" id="Question2">&nbsp;</td> </tr> <tr> 
                    <td colspan="3" align="left" valign="middle" nowrap class="h2" id="Question">Question</td> </tr> <tr> 
                    <td align="left" valign="middle" nowrap class="h2">&nbsp;</td> </tr> <tr> 
                    <td colspan="3" align="center" valign="middle"> <table width="350" border="0" cellpadding="0"> <tr> 
                    <td style="width: 20%" align="center" valign="middle"> <input id="ButtonCancel"  class="FormButton" 
                    name="ButtonCancel" type="button" value="No"> </th> <td style="width: 20%" align="center" valign="middle"> 
                    <input id="ButtonOK" class="FormButton" name="ButtonOK" type="button" value="Yes"> </th> </tr> </table> 
                    </td> </tr> </table> </body> </html>]] ; 
   local dialog = HTML_Dialog(true, myHtml, 440, 170, Header) ; 
   dialog:AddLabelField("Question",Question) ; 
   if not dialog:ShowDialog() then ; 
      return false 
   else 
      return  true
   end 
end
 --  ===================================================
 

Name:

InquiryNumberBox(Header, Quest, DefaltN)

Example:

Code:

function InquiryNumberBox(Header, Quest, DefaltN)
--[[
  Number Box for user input with default value
  Caller: local x = InquiryNumberBox("Cabinet Maker", "Enter your last name?",30.0)
  Dialog Header = "Cabinet Maker"
  User Question = "Enter your last name?"
  Default Value = 30.0
  Returns = Number
]]
   local myHtml = [[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
<html> <head> <meta content = "text/html; charset = iso-8859-1" http-equiv = "Content-Type"> <title>Easy Tools</title> 
<style type = "text/css">  html {overflow: auto ; } body { background-color: #EBEBEB ; }body, td, th 
{font-family: Arial, Helvetica, sans-serif ; font-size: 12px ; color: #000 ; } .FormButton {font-weight: bold ; 
width: 100% ; font-family: Arial, Helvetica, sans-serif ; font-size: 12px ; } body { background-color: #EBEBEB; }
</style> </head> <body bgcolor = "#EBEBEB" text = "#000000"> <table width = "470" border = "0" cellpadding = "0"> 
<tr> <th width = "381" align = "right" valign = "middle" bgcolor = "#EBEBEB" id = "QuestionID"> 
<strong>Message Here</strong></th> <th width = "83" align = "left" valign = "middle" bgcolor = "#EBEBEB"> 
<input name = "qInput" type = "text" id = "qInput" size = "10"> </th> </tr> <tr> 
<td colspan = "2" align = "center" valign = "middle" bgcolor = "#EBEBEB"> <table border = "0" width = "100%"> 
<tr align = "right"> <td style = "width: 20%"> </td> <td style = "width: 20%"></td> <td style = "width: 25%"></td> 
<td style = "width: 15%"> 
<input id = "ButtonCancel" class = "FormButton" name = "ButtonCancel" type = "button" value = "Cancel"> </td> 
<td style = "width: 15%"> <input id = "ButtonOK" class = "FormButton" name = "ButtonOK" type = "button" value = "OK"> 
</td> </tr> </table> </td> </tr> </table> </body> </html>]] 
   local dialog = HTML_Dialog(true, myHtml, 505, 140, Header) ; 
   dialog:AddLabelField("QuestionID", Quest) ;
   dialog:AddDoubleField("qInput", DefaltN) ; 
   if not dialog:ShowDialog() then ; return  tonumber("0.0") ; else ; return tonumber(dialog:GetDoubleField("qInput")) ; end 
end
 

Name:

InquiryYesNo(Header, Question)

Example:

Code:

function InquiryYesNo( Header, Question,)
 --[[
     Drop list for user to input project info
     Caller = local y = InquiryDropList("JimAndi Cabinet Maker", "Select Cabinet Style", 290, 165, IniFile)
     Dialog Header = "JimAndi Cabinet Maker"
     User Question = "Select Cabinet Style"
     Selection Array = IniFile
     Returns = String
   ]]
   local myHtml = [[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
                 "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> 
                 <meta content = "text/html; charset = iso-8859-1" http-equiv = "Content-Type"> 
                 <title>Project Information</title> <style type = "text/css">html { overflow: auto; } body, td, th 
                 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000; background-color: #EBEBEB;
                 } .FormButton { 	font-weight: bold; 	width: 60%; 	font-family: Arial, Helvetica, sans-serif;
                 font-size: 12px; } .h2 { 	font-size: 12px; 	font-weight: bold; 	text-align:left;
                 text-wrap:none; 	vertical-align:middle; } </style> </head> <body bgcolor = "#EBEBEB" text = "#000000"> 
                 <table width="400" border="0" align="left" cellpadding="0"> <tr> 
                 <td colspan="3" align="left" valign="middle" nowrap class="h2" id="Question2">&nbsp;</td> </tr> <tr> 
                 <td colspan="3" align="left" valign="middle" nowrap class="h2" id="Question">Question</td> </tr> <tr> 
                 <td align="left" valign="middle" nowrap class="h2">&nbsp;</td> </tr> <tr> 
                 <td colspan="3" align="center" valign="middle"> <table width="350" border="0" cellpadding="0"> <tr> 
                 <td style="width: 20%" align="center" valign="middle"> <input id="ButtonCancel"  class="FormButton" 
                 name="ButtonCancel" type="button" value="No"> </th> <td style="width: 20%" align="center" valign="middle"> 
                 <input id="ButtonOK" class="FormButton" name="ButtonOK" type="button" value="Yes"> </th> </tr> </table> 
                 </td> </tr> </table> </body> </html>]] ; 
-- =========================================================
 local dialog = HTML_Dialog(true, myHtml, 440, 170, Header) ; 
    dialog:AddLabelField("Question",Question) ; 
    if not dialog:ShowDialog() then ; 
       return false 
    else 
      return  true
    end 
 end
 --  ===================================================
 

Name:

InquiryPathBox(Header, Quest, DefaltN)

Example:

Code:

function InquiryPathBox(Header, Quest, DefaltPath)
--[[
Number Box for user input with default value
Caller: local X = InquiryPathBox("Select Path", "What image to use?", "C:\\")
Dialog Header = "Tool Name"
User Question = "Path name?"
Default Value = "C:\\"
Returns = String
]]
local myHtml = [[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta content = "text/html; charset = iso-8859-1" http-equiv = "Content-Type"> <title>Easy Tools</title>
<style type = "text/css"> html {overflow: auto ; } body { background-color: #EBEBEB ; }body, td,
th {font-family: Arial, Helvetica, sans-serif ; font-size: 12px ; color: #000 ; } .FormButton {font-weight: bold ;
width: 100% ; font-family: Arial, Helvetica, sans-serif ; font-size: 12px ; } body { background-color: #EBEBEB; } </style> </head> <body bgcolor = "#EBEBEB" text = "#000000"> <table width = "470" border = "0" cellpadding = "0">
<tr> <th align = "left" valign = "top" bgcolor = "#EBEBEB" id = "QuestionID"><strong>Message Here</strong></th>
<th align = "left" valign = "middle" bgcolor = "#EBEBEB">&nbsp;</th> </tr> <tr> <th width = "381" align = "right" valign = "middle" bgcolor = "#EBEBEB" id = "QuestionID"> <input name = "DInput" type = "text" id = "DInput" size = "60"></th> <th width = "83" align = "center" valign = "middle" bgcolor = "#EBEBEB"> <span style="width: 15%"> <input id = "DirectoryPicker" class = "DirectoryPicker" name = "DirectoryPicker" type = "button" value = "Path"> </span></th> </tr> <tr> <td colspan = "2" align = "center" valign = "middle" bgcolor = "#EBEBEB"> <table border = "0" width = "100%"> <tr align = "right"> <td style = "width: 20%"> </td> <td style = "width: 20%"></td> <td style = "width: 25%"></td> <td style = "width: 15%"> <input id = "ButtonCancel" class = "FormButton" name = "ButtonCancel" type = "button" value = "Cancel"> </td> <td style = "width: 15%"> <input id = "ButtonOK" class = "FormButton" name = "ButtonOK" type = "button" value = "OK"> </td> </tr> </table> </td> </tr> </table> </body> </html>]] -- =============================================
local dialog = HTML_Dialog(true, myHtml, 505, 150, Header) ;
dialog:AddLabelField("QuestionID", Quest) ;
dialog:AddTextField("DInput", DefaltPath ) ;
dialog:AddDirectoryPicker("DirectoryPicker", "DInput", true) ;
if not dialog:ShowDialog() then ;
return "" ;
else ;
return dialog:GetTextField("DInput") ;
end
end