http://ahkscript.org/boards/viewtopic.php?f=5&t=6372
Code: Select all
#singleinstance,force
pr=notepad
sc=ahk_exe Notepad.exe
Gui,2: Add, Button, x10 y60 h25 w160 gA1,Write to Notepad
Gui,2: Show,x10 y10 h90 w200,Run_Notepad
Gui,2: Add, Edit, x10 y10 h40 w180 vE1, TEST1 `nTEST2 `n
return
2Guiclose:
exitapp
A1:
Gui,2: Submit, nohide
IfWinNotExist,%sc%
{
Run, %pr%,,,pid1
WinWait,%SC%
IfWinNotActive ,%SC%,,WinActivate,%SC%
WinWaitActive,%SC%
}
ControlSend,,%e1%,%sc%
return
AHK 1.1.19.03 64 bitTEST1 ; first send good
TEST2 ; first send good
tEST! ; second send note lower "T" and "!" instead of "1"
tEST@; second send note lower "T" and "@" instead of "2"
Win 7 64 bit