Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Smart Dialog HELP!!!
For a few days now I have been trying to figure out how to make a Smart Dialog and just cannot figure it out. I have looked everywhere (help file, forum, etc..) and just get confused when I try to do it myself.
I am trying to make a Dialog that has several options to choose from, all with check marks next to them. I want the user to be able to check ONLY the options they want and once "OK"is clicked, I want the program to carry out only the options that were checked. Please forgive me if this is a stupid question, I simply don't understand how it works.
If somebody could post an example of the complete script to do something like this, I could at least see how it works and figure it out from there......Hopefully ; )
Any and all information would be great.

You don't need a smart dialog if the code will be executed after closing the dialog.

Create simple dialog, add checkboxes, click Apply and Close. It creates new function that contains dialog definition. Lets say the function is named "Dialog39". Example:

Copy      Help

;0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Button 0x54012003 0x0 18 34 48 12 "one"
;4 Button 0x54012003 0x0 20 56 48 12 "two"
;5 Button 0x54012003 0x0 16 78 48 12 "three"
;DIALOG EDITOR: "" 0x2020100 "" ""

Then open the macro that will show the dialog. Copy dialog code from output and paste in the macro:

Copy      Help
str controls = "3 4 5"
str c3one c4two c5thr
if(!ShowDialog("Dialog39" 0 &controls)) ret

When the dialog will be closed using Cancel or X, the macro will end. When OK, it will continue. The variables will be 1 if checked, 0 if unchecked. Use if:

Copy      Help
,out "one checked"
,out "two checked"
,out "three checked"
Thank you very much for the prompt reply. Your information was VERY helpful. I think I understand how it works now. I created a program with a dialog and it WORKED!!

Thank you again,
jminnie Big Grin

Forum Jump:

Users browsing this thread: 1 Guest(s)