boiler wrote:If WinActive, Chrome is not a command or a function call. You need either IfWinActive, Chrome (no space), or if WinActive("Chrome") (if with a function call).
You also need a loop to have it continue to check. You should also make sure you are using the proper CoordMode for your coordinates.
Btw, no need for braces around F, D, and I.
Yeah yeah I know I need loop, keybind is only to test things out. I did this:
Code: Select all
s::
if WinActive("asd")
Send {F}
Else
Send {D}
Return
Esc::ExitApp
asd - is the name of the folder. For example when I have opened chrome and press S it would type D, if I have the folder activated and press S while the searchbar is active it sends F. So all good. The problem comes when I try to change "asd" to game name, it sends D no matter if I have it active or not. Im running script as administrator and the game doesnt block it.
@Edit: Nevermind, figured it out, thanks man!