Sending a variable to a user input box
Posted: 19 Mar 2020, 09:33
Dear all,
I searched the threads but this has alluded me.
I am trying to send the variable %complaint% to the 2nd user input box that appears in my script. Avoiding the need to manually type it.
The user input box uses control class Edit1. Is there a correct way to send variables to input boxes?
Using ControlSetText,Edit1, %complaint% didn't work as expected
Once again appreciate your help. You guys are absolute geniuses.
J
I searched the threads but this has alluded me.
I am trying to send the variable %complaint% to the 2nd user input box that appears in my script. Avoiding the need to manually type it.
The user input box uses control class Edit1. Is there a correct way to send variables to input boxes?
Using ControlSetText,Edit1, %complaint% didn't work as expected
Code: Select all
^#t::
setkeydelay , -1
WinGet,ID,ID,A
InputBox, complaint, Enter complaint ;1st INPUT BOX
WinActivate,ahk_id %ID%
send ^+{s} ;shortcut for file-> save as
WinWaitActive, Save As ; WainWait executes the next command immediately after the window appear which can case problems
sleep, 1000
ControlSetText,Edit1, %complaint% initial assessment,A
sleep, 100
InputBox, folder, Enter folder ; 2nd INPUT BOX
sleep, 1000
ControlSetText,Edit1, %complaint%
sleep, 100
send {Enter}
J