WinShow/WinActivate is not working any more

Get help with using AutoHotkey and its commands and hotkeys
a08574
Posts: 3
Joined: 20 Nov 2017, 07:49

WinShow/WinActivate is not working any more

20 Nov 2017, 11:10

Hi All,

since two years I'm using a script to do some telco conferencing with CISCO Jabber without any problems. Suddenly the functions WinShow/WinActivate are not working any more as expected. I did alredy update AHK and did recompile the script without any success. I'm running out of ideas....

...
...
1 IfWinExist, Cisco Jabber
2 {
3 WinShow, Cisco Jabber
4 WinActivate, Cisco Jabber
5 Sleep, 100
6 MouseMove, %xOffset%, %yOffset%
7
8
...
...

I'm checking if CISCO Jabber is running (Line 1) that statement is working fine. If Jabber is running I want to make it active with line 3 and 4 and afterwards doing some mouse movements (Line 6 ff) and inputs into Jabber window.

Problem is, that line 3 and 4 are suddenly not working any more. The script is not activating the jabber window any more.
As already stated the script was working since more than 2 years. Suddenly it is not activating the Jabber window any more, even if it is detecting (Line 1) if Jabber is active. I also tried it with WinGet but is still not working.

Thx for any ideas
Stefan
Hiney

Re: WinShow/WinActivate is not working any more

20 Nov 2017, 11:15

a08574 wrote:Hi All,

since two years I'm using a script to do some telco conferencing with CISCO Jabber without any problems. Suddenly the functions WinShow/WinActivate are not working any more as expected. I did alredy update AHK and did recompile the script without any success. I'm running out of ideas....

...
...
1 IfWinExist, Cisco Jabber
2 {
3 WinShow, Cisco Jabber
4 WinActivate, Cisco Jabber
5 Sleep, 100
6 MouseMove, %xOffset%, %yOffset%
7
8
...
...

I'm checking if CISCO Jabber is running (Line 1) that statement is working fine. If Jabber is running I want to make it active with line 3 and 4 and afterwards doing some mouse movements (Line 6 ff) and inputs into Jabber window.

Problem is, that line 3 and 4 are suddenly not working any more. The script is not activating the jabber window any more.
As already stated the script was working since more than 2 years. Suddenly it is not activating the Jabber window any more, even if it is detecting (Line 1) if Jabber is active. I also tried it with WinGet but is still not working.

Thx for any ideas
Stefan


try adding some sleep 5000 between things to see if it matters

add detecthiddenwindows on and settitlematchmode 2

even though i know you say it detects line one, try these things

no other ideas
a08574
Posts: 3
Joined: 20 Nov 2017, 07:49

Re: WinShow/WinActivate is not working any more

20 Nov 2017, 11:48

Hi,

thx for the info.
I didn't work. detecthiddenwindows and settitlematchmode was alreasdy set before...
Osprey
Posts: 193
Joined: 18 Nov 2017, 05:50

Re: WinShow/WinActivate is not working any more

20 Nov 2017, 16:33

Try WinRestore [, WinTitle]. I learned yesterday that a window can still report being "active" when it's minimized. WinRestore will un-minimize it.
a08574
Posts: 3
Joined: 20 Nov 2017, 07:49

Re: WinShow/WinActivate is not working any more

21 Nov 2017, 09:53

Nope, didn't help.

tried it with and without WinRestore:

DetectHiddenWindows, On
SetTitleMatchMode, 2


IfWinExist,Cisco Jabber
{
sleep 1000
WinRestore, Cisco Jabber
sleep 1000
WinShow, Cisco Jabber
sleep 1000
WinActivate, Cisco Jabber

Interesting is, that after the WinShow Command Jabber is opening an additional emty window on the screen with no content at all. This window can only be closed if Jabber will be closed... But as already said, IfWinExist is working without problems ....
Georgie Munteer

Re: WinShow/WinActivate is not working any more

21 Nov 2017, 10:05

can you get this to work with another program? is this only a problem with jabber?
Osprey
Posts: 193
Joined: 18 Nov 2017, 05:50

Re: WinShow/WinActivate is not working any more

21 Nov 2017, 11:38

Try disabling DetectHiddenWindows and the WinShow command. That empty window that you're getting is likely a hidden window. Try just doing WinRestore and WinActivate. I'm not sure that it makes any difference, but try them in both orders. If that doesn't help, WinRestore's help mentions the following command that might work for certain types of windows that don't respond to WinRestore:

PostMessage, 0x112, 0xF120,,, WinTitle, WinText ; 0x112 = WM_SYSCOMMAND, 0xF120 = SC_RESTORE

Return to “Ask For Help”

Who is online

Users browsing this forum: Capn Odin and 39 guests