WinActivate doesn't work on MSI Afterburner

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
capslock
Posts: 6
Joined: 25 Sep 2016, 02:25

WinActivate doesn't work on MSI Afterburner

30 Jun 2017, 06:39

Hi, I'm using MSI Afterburner to overclock my PC and I'm trying to write AHK script to activate afterburner window to select the profile.

here is my code.

Code: Select all

DetectHiddenWindows, On

;MSIafterburner info
MSIABTitle := "MSI Afterburner"
MSIABClass := "Afx:00400000:20:00010003:00000000:00000000"

IfWinExist, %MSIABTitle%
{
	;WinGetPos, Xpos, Ypos
	WinShow
	WinRestore
	WinActivate
	Msgbox found!
	;Msgbox found! at %Xpos%,%Ypos%
}
else
{
	Msgbox 404 not found
}
and it didn't work
the window exist but can't activate

after some try and error here is what I found
-when minimize afterburner it go to tray icon not taskbar.
-it seem like when minimize afterburner it just hide the window or something, because I can get win position when minimize and it is the same position as when it active.
-I also use WinShow and WinRestore but still not working
-I also try using ahk_class, but still the same.

is there any way to make this work?

also, here is MSI afterburner download link : https://www.msi.com/page/afterburner
capslock
Posts: 6
Joined: 25 Sep 2016, 02:25

Re: WinActivate doesn't work on MSI Afterburner

02 Jul 2017, 06:06

ok, after some more days of try and error, I found a solution.

the problem is afterburner will always run on admin privilege and in order to control it, AHK also need admin privilege too

so all I need to do is run my script as admin and the normal WinActivate will do its job.
Athyra
Posts: 1
Joined: 14 Dec 2018, 11:42

Re: WinActivate doesn't work on MSI Afterburner

14 Dec 2018, 11:48

capslock wrote:
02 Jul 2017, 06:06
ok, after some more days of try and error, I found a solution.

the problem is afterburner will always run on admin privilege and in order to control it, AHK also need admin privilege too

so all I need to do is run my script as admin and the normal WinActivate will do its job.
ty so much for this post
i joined just to say ty to this
srsly, helped me not lose my mind!

TY

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mikeyww and 280 guests