Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog trouble launching macro
#3
Function Form222
Code:
Copy      Help
;/Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

;BEGIN DIALOG
;0 "" 0x10C80A44 0x100 0 0 216 123 "murFTP: Enter Event Date"
;1 Button 0x54030001 0x4 100 102 48 14 "OK"
;2 Button 0x54030000 0x4 154 102 50 14 "Cancel"
;3 SysDateTimePick32 0x54000000 0x204 6 22 96 14 ""
;4 Static 0x54000000 0x0 150 72 106 22 "Press OK to use today's date or choose another date below."
;5 Edit 0x54030080 0x200 6 4 96 14 ""
;END DIALOG
;DIALOG EDITOR: "" 0x202000B "" ""


ret
;messages
SYSTEMTIME- t_st1
sel message
,case WM_INITDIALOG
,;here can be initialized using DTM_SETSYSTEMTIME
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,SendMessage(id(3 hDlg) DTM_GETSYSTEMTIME 0 &t_st1)
,
,case IDCANCEL
ret 1

Macro
Code:
Copy      Help
;variable for date
SYSTEMTIME- t_st1

;standard dialog code
str controls = "5"
str e5
if(!ShowDialog("Form222" &Form222 &controls)) ret

;convert date to string
str t
DATE d.fromsystemtime(t_st1) ;;convert to DATE (for easy display)
;str s=d

t.time(d "%Y%m%d")

;results
out e5
out t


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)