WinActivate not Switching with my code

Get help with using AutoHotkey and its commands and hotkeys
DMDComposer
Posts: 3
Joined: 14 Jul 2018, 18:55

WinActivate not Switching with my code

24 Jun 2019, 08:26

Hi,

I'm still learning AHK and I feel once again it's something simple I can do to fix my code. I just want to be able to activate my script and have it be able to switch to the window even if the window is not focused. I read about #WinActivateForce but I wasn't sure if it didn't help or where I was placing it was wrong. Here is my simple code

Code: Select all

;Other Program Commands

		else if command = 800 ;Vepro Insert New Kontakt 6
			{	
CoordMode, Mouse, Window
Sleep, 500
WinWait, Vienna Ensemble Pro Server 7.0.834 (64-bit) ahk_class Qt5QWindowIcon,, 5
WinActivate, Vienna Ensemble Pro Server 7.0.834 (64-bit) ahk_class Qt5QWindowIcon
Sleep, 50
MouseClick, L, 172, 34
Sleep, 50
MouseClick, L, 180, 58
Sleep, 50
Send, {Blind}kon{Enter}{Sleep 10}
}
This goes off a input key command, type a 3 digit code to execute a certain mini-script. The script above works perfectly if the window is in focus. I just want to be able to have the script also switch to the desired window if it's not in focus. Is this possible?

Thanks!

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], hasantr, MannyKSoSo, teadrinker, Vh_ and 192 guests