Page 1 of 1

Stop script running in the background after change window

Posted: 30 Jun 2018, 04:56
by idkwho
Hi I'm having problem with the script which still runs after I alt-tab and it affect my use in google chrome or other application. How can I make the script to only apply in game and disabled for example when I am using other applications? My game is running in borderless fullscreen if that makes any difference.

Thank you

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Re: Stop script running in the background after change window

Posted: 30 Jun 2018, 14:49
by _3D_
You need to check what is winactive() and do actions if your game is active.

Re: Stop script running in the background after change window

Posted: 30 Jun 2018, 16:13
by idkwho
I have used #IfWinActive, Black Desert Online however it still seems to work outside of the game for instance when I switch windows to Google Chrome and click one of the tabs it thinks that my mouse button is hold down and drags the tab. I'm confused on what I should change in my script to fix this issue.

Re: Stop script running in the background after change window

Posted: 30 Jun 2018, 23:40
by _3D_
https://autohotkey.com/docs/commands/_I ... m#Examples
* See in example:
#IfWinActive, yourGame ;block begin no {}
...
#IfWinActive ;block end

* Check what is the exactly name of yourGame executive (game.exe, loader.exe, somename.exe)