Stop script running in the background after change window

Post gaming related scripts
idkwho
Posts: 2
Joined: 30 Jun 2018, 04:50

Stop script running in the background after change window

30 Jun 2018, 04:56

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

_3D_
Posts: 180
Joined: 29 Jan 2014, 14:40

Re: Stop script running in the background after change window

30 Jun 2018, 14:49

You need to check what is winactive() and do actions if your game is active.
AHKv2.0 use the future now.
idkwho
Posts: 2
Joined: 30 Jun 2018, 04:50

Re: Stop script running in the background after change window

30 Jun 2018, 16:13

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.
_3D_
Posts: 180
Joined: 29 Jan 2014, 14:40

Re: Stop script running in the background after change window

30 Jun 2018, 23:40

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)
AHKv2.0 use the future now.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 10 guests