Odd WinActivate behavior?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Ruevil2
Posts: 173
Joined: 14 Jul 2014, 10:39

Odd WinActivate behavior?

20 Jul 2017, 10:17

OK so I have run into what I think is a recent bug in WinActivate. I don't think it used to run this way.

Here is my code:

Code: Select all

F12::
	WinActivate, ahk_class RCLIENT
	WinGetPos,,, w, h, A
	MouseMove, (w*.10), (h*.05)
return
If the window I am targetting(RCLIENT) is the active window, the hotkey never activates AT ALL. Zero lines executed in code history and return continues to count. Now, if the window I am targetting is NOT the active window, the code executes fully and properly.
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: Odd WinActivate behavior?

20 Jul 2017, 12:11

Just to be clear you get this behaviour with just the supplied code, it is not taken out of a larger script ?

Since it sounds like the behaviour of #IfWinNotActive
Please excuse my spelling I am dyslexic.
Ruevil2
Posts: 173
Joined: 14 Jul 2014, 10:39

Re: Odd WinActivate behavior?

20 Jul 2017, 15:02

Capn Odin wrote:Just to be clear you get this behaviour with just the supplied code, it is not taken out of a larger script ?

Since it sounds like the behaviour of #IfWinNotActive
Yes I was able to recreate the bug with just the supplied code. Although the code came from a much larger script, it is contained within a
function and I do not use any directives in the script.


I will have to check my home computer now, as I can't seem to reproduce the effect on my work PC, even using the same script.

Could this strange behavior have been caused by a previous version of my script hanging or something?
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Odd WinActivate behavior?

20 Jul 2017, 15:16

Admin window? I think that would be consistent behaviour. 50% of the time problems are because it's an Admin window. (I didn't think of it, when I first read the problem description, only now.)
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Ruevil2
Posts: 173
Joined: 14 Jul 2014, 10:39

Re: Odd WinActivate behavior?

20 Jul 2017, 17:39

Ruevil2 wrote: I will have to check my home computer now, as I can't seem to reproduce the effect on my work PC, even using the same script.
Well I guess that was probably caused by maybe another program running or something because now I can't reproduce the problem. I'm using the same unchanged piece of test script for all testing. I have no idea. Gremlins... :headwall:

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: gabelynn1, Google [Bot], Tech Stuff and 162 guests