Problem with large ahk_class

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ABUSHIHAB
Posts: 8
Joined: 29 Nov 2021, 12:10

Problem with large ahk_class

06 Dec 2021, 12:29

Good evening,

I contribute computing power to GIMPS, the prime number calculator. I was trying to write a script that launches it, but AHK isn't accepting the class number as valid. Here's the code:

Code: Select all

^x::ExitApp

DetectHiddenWindows On

#o:: if not WinExist("ahk_class Afx:00007FF7AD9C0000:8:0000000000010003:0000000000000000:000000000024064B")
	{
	run,"C:\Program Files\GIMPS\prime95.exe"
	}
Here's the error message:
Error: Invalid single-line hotkey/hotstring.

Specifically: #o::if not WinExist("ahk_class Afx:00007FF7AD9C0000:8:0000000000010003:0000000000000000:000000000024064B...

Line#
001: Return
001: ExitApp
001: Return
003: DetectHiddenWindows,On
---> 005: if WinExist("ahk_class Afx:00007FF7AD9C0000:8:0000000000010003:0000000000000000:000000000024064B")
I got that class from another simple program:

Code: Select all

^o::
WinGetClass, class, A
MsgBox, class "%class%"
What should I do?
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: Problem with large ahk_class

06 Dec 2021, 12:40

Code: Select all

#o:: 
if not WinExist("ahk_class Afx:00007FF7AD9C0000:8:0000000000010003:0000000000000000:000000000024064B")
{
	run,"C:\Program Files\GIMPS\prime95.exe"
}
return
Multi line hotkeys need to be on their own line not the hotkey line.

HTH

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Joey5, RandomBoy and 387 guests