04-02-2013, 11:54 PM
Hi Gintaras,
Please can you assist me with returning what option button has been selected on the dialog and returned to the macro, when the start button is pressed.
Function Hot_Dialog
When start is clicked, either option 1 or 2 will be selected and I need to be able to send this to macro Hot.
Function Hot
Also is TO_Check the best way to set a default checked option?
Kind Regards
Matt
Please can you assist me with returning what option button has been selected on the dialog and returned to the macro, when the start button is pressed.
Function Hot_Dialog
/Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 287 130 "The Project"
;3 Button 0x54032000 0x0 6 4 50 38 "Start"
;4 Button 0x54032000 0x0 6 46 50 38 "Stop"
;9 Edit 0x54200844 0x20000 62 20 222 104 ""
;5 Button 0x54032009 0x0 62 6 100 14 "Table 1"
;6 Button 0x54002009 0x0 164 6 120 14 "Table 2"
;2 Button 0x54030000 0x4 6 88 50 38 "Close"
;7 Button 0x54020007 0x0 0 30 108 100 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030408 "" "" "" ""
str controls = "9 5 6"
str e9 o5Dub o6Sma
if(!ShowDialog("Hot_Dialog" &Hot_Dialog &controls)) ret
ret
;messages
sel message
,case WM_INITDIALOG
,TO_Check win("The Project" "#32770") "5 -6" 1
,/GdiObject- brush=CreateSolidBrush(ColorFromRGB(0 176 255))
,/SetDlgItemText hDlg 6 ""
,case WM_DESTROY
,/case WM_CTLCOLORDLG ret brush
,case WM_COMMAND goto messages2
,case WM_APP
,int c=id(9 hDlg)
,SendMessage c EM_SETSEL 1000000000 1000000000
,SendMessage c EM_REPLACESEL 0 F"{lParam%%s}[]"
ret
;messages2
sel wParam
,case 3
,str toPlay
,if o5Dub=1
,,toPlay="table1"
,else
,,toPlay="table2"
,SetDlgItemText hDlg 3 "Running"
,EnableWindow id(3 hDlg) 0; EnableWindow id(4 hDlg) 1
,mac "Hot" " " hDlg toPlay ;;_s.getwintext(id(6 hDlg))
,
,case 4
,SetDlgItemText hDlg 3 "Start"
,shutdown -6 0 "Hot"
,EnableWindow id(3 hDlg) 1; EnableWindow id(4 hDlg) 0
,
,case IDCANCEL
ret 1
When start is clicked, either option 1 or 2 will be selected and I need to be able to send this to macro Hot.
Function Hot
function hDlg toPlay
inpp "[*599214908CAEC73F02*]" "Password Required" "Please Enter Password To Begin" 1 ;;show password input box. If Cancel or incorrect password, end macro.
ARRAY(str) number_locations;; co-ordinates of each number 0 - 36
Also is TO_Check the best way to set a default checked option?
Kind Regards
Matt