Clicking in a certain program
Clicking in a certain program
I wanted to edit a AHK script i made so that it could click into a certain window, so that if, while it is running, something steals the cursor away from it, it would continue to work, is this possible?
Re: Clicking in a certain program
If you mean that you want to activate the window, you can use WinActivate. You can also use WinWaitNotActive in a Loop, to trigger that if needed.
An alternative could be to set the window to on-top status, though that does not necessarily keep it active.
Code: Select all
Run, notepad.exe
WinWaitActive, ahk_exe notepad.exe
Loop {
WinWaitNotActive
WinActivate
}