10-17-2007, 05:45 AM
Example
Function dialog_check_start_stop_macro
Function dialog_check_start_stop_macro
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "3"
str c3Sta
if(!ShowDialog("dialog_check_start_stop_macro" &dialog_check_start_stop_macro &controls)) ret
;BEGIN DIALOG
;0 "" 0x90C80AC4 0x108 0 0 59 24 "Dialog"
;3 Button 0x54013003 0x0 6 6 48 14 "Start"
;END DIALOG
;DIALOG EDITOR: "" 0x2020100 "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 3
,if(but(lParam)) ;;checked
,,mac "Macro508"
,,_s="Stop"
,else ;;unchecked
,,shutdown -6 0 "Macro508"
,,_s="Start"
,_s.setwintext(lParam)
,case IDOK
,case IDCANCEL
ret 1