Stop script running in the background after change window

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Stop script running in the background after change window

Re: Stop script running in the background after change window

Post by _3D_ » 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)

Re: Stop script running in the background after change window

Post by idkwho » 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.

Re: Stop script running in the background after change window

Post by _3D_ » 30 Jun 2018, 14:49

You need to check what is winactive() and do actions if your game is active.

Stop script running in the background after change window

Post by idkwho » 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]GeSHi © Codebox Plus


Top