11-20-2015, 07:49 PM
I'm trying to create a macro with a dialog box that accepts 2 text box fields, and uses those as output in the macro
Dialog code (named Dialog2):
Function Dialog2
and the Macro (example):
Macro Macro1
How do I pull the info, am I calling the dialog correctly to use the user input as output elsewhere, etc?
Dialog code (named Dialog2):
Function Dialog2
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Edit 0x54030080 0x200 84 8 96 12 "NewJobNo[]"
;4 Edit 0x54030080 0x200 84 32 96 12 "OldJobNo"
;5 Static 0x54000000 0x0 16 8 48 12 "New Job No"
;6 Static 0x54000000 0x0 16 32 48 12 "Old Job No"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040304 "*" "" "" ""
str controls = "3 4"
str e3New e4Old
if(!ShowDialog(dd 0 &controls)) ret
out e3New
out e4Old
and the Macro (example):
Macro Macro1
Dialog2
'Wr ;; Win+R
int w2=wait(15 win("Run" "#32770"))
'"notepad" Y ;; "notepad" Enter
int w3=wait(18 win("Untitled - Notepad" "Notepad"))
;;; e3New should output here
;;; e4Old should output here
How do I pull the info, am I calling the dialog correctly to use the user input as output elsewhere, etc?