Strange WinActive detection bug out of nowhere

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Danniique
Posts: 6
Joined: 11 Feb 2018, 02:11

Strange WinActive detection bug out of nowhere

28 Sep 2018, 21:54

I've had this AHK script working perfectly fine for League of Legends for quite some time now and all of a sudden it's producing a strange bug and I can't figure out what's causing it.

The problem is that my script is having a detection issue for the game window, where previously it didn't. Here are the weird symptoms.
  • When the Loading screen for the game comes up, my script determines the game window is active - business as usual.
  • Once the game loads in, the script no longer recognises the game window as being active. The context-sensitive hotkeys and other WinActive expressions are evaluated as False.
  • If I relaunch the script manually at this point, all WinActive expressions magically start evaluating as True again and everything works fine.
From the above symptoms, I think we can deduce that:
1. my Winactive(identifiers) are correct, because the script does work - it just needs to be reloaded to do so. WindowSpy also concurs that none of the gaming window's identifiers have in fact changed.

This only started following a game patch, but I'm not sure what they could have changed to cause this. I can work around this by using a non-sensitive hotkey to reload the script but I'm very curious as to why this is happening and wondering if anyone has any thoughts on what might be going on here.

Dannii

*edit* I tried adding a non-context-sensitive hotkey but it simply doesn't work once the game has loaded. I have found if I use it while the loading screen is up, the script reloads and everything works fine. I'm so puzzled right now.

I'm starting to wonder Riot introduced anti-cheat/spam measures into their game because I have also found that - for example, using a hotkey to Send, {Enter} does not open the chat box in game, while using the actual Enter key does. Yet you can use the send command to Send, some text {Enter} once the chat box is already open and it sends just fine.
User avatar
Scr1pter
Posts: 1278
Joined: 06 Aug 2017, 08:21
Location: Germany

Re: Strange WinActive detection bug out of nowhere

29 Sep 2018, 06:51

Hi,
Maybe it wouldn't be bad to post some code.
Perhaps you could try adding some delay which activates the script a bit later.

As far as I understood, you start the game, the script is active but stops working after some seconds?

Regards
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee, peter_ahk and 410 guests