"WinGet, variableName , List, yourWindowName" ( )
then call the variable variableName contate using 1in eachControlSend
eg:
WinGet, nexid, List, myHyperTerminal
ControlSend, , {shift down}at=cmgs{shift up}=303{ENTER}, ahk_id %nexid1%
sleep, 1000
ControlSend, , {shift down}sms{shift up}{space}10000, ahk_id %nexid1%
sleep, 1000
if you want to use a control key such as shift, ctrl, alt, don't forget to add "SetKeyDelay, intDelay, intPressDuration"(without quote)
for example, a script will be specified this
SetKeyDelay, 50, 20
WinGet, nexid, List, zz1
$F6::
ControlSend, , {shift down}at=cmgs{shift up}=303{ENTER}, ahk_id %nexid1%
sleep, 1000
ControlSend, , {shift down}sms{shift up}{space}10000, ahk_id %nexid1%
sleep, 1000
return
$F7::pause
it will be sent to the active / inactive window "zz1" as:
AT+CMGS=303
SMS 10000