But whatever I do, it doesn't seem to work.
For example .:
Code: Select all
WinID = Sök ahk_exe Label32.exe ahk_class TfrmSearch
IfWinExist %WinID%
{ WinActivate %WinID%
WinWaitActive %WinID%
}
The window can be manually closed as follows .:
1. Alt + A
2. Press left mouse button on "TButton1"
3. Press left mouse button on the "X" in the upper right corner.
4. Tab + Tab + Enter
But nothing (below) works for me What am I doing wrong?
( WinID = Sök ahk_exe Label32.exe ahk_class TfrmSearch from Window Info )
Code: Select all
ControlSend TButton1, !A, %WinID%
ControlSend TButton1, !A
ControlSend ,, {Tab}{Tab}{Enter}, %WinID%
ControlSend ,, {Tab}{Tab}{Enter}
ControlClick TButton1, %WinID%
ControlClick TButton1
WinClose %WinID%
WinClose
WinKill %WinID%