Jump to content
(Open Beta) HyperSpin 2 is now available for everyone ×

Why won't this AHK script work?


Dime333

Recommended Posts

Posted

I'm running an app called HyperElectronicAHK.exe that is a compiled script that looks like this:

 

Loop
{
Process, Exist, mame.exe
If ErrorLevel <> 0
run taskkill /IM HyperElectronicAHK.exe,, Hide
Else
t::9
y::8
U::7
b::6
a:
s::-
q::-
w::-
e::-
z::-
x::-
c::-
v::-
l::-
o::-
h::-
j::-
k::-
}

It's remapping keys and I want the script to stop if mame is running. What am I doing wrong?

 

Posted

Does the task kill line work in the command line?

 

As in, does the command 'taskkill /IM HyperElectronicAHK.exe' do what you want when you run it in a command prompt?

 

 

Also, I wouldn't task kill the script, from within the script.  There are better and more supported methods for having a script end - check out the AHK docs.

Posted

Does the task kill line work in the command line?

 

As in, does the command 'taskkill /IM HyperElectronicAHK.exe' do what you want when you run it in a command prompt?

 

 

Also, I wouldn't task kill the script, from within the script.  There are better and more supported methods for having a script end - check out the AHK docs.

Yes it does, but I don't need this script anymore. Thanks for posting though, guys.

Posted

I can't do that since you can't register.

 

 

 

Your using the old forum.  Click the green forum button on this page to get to the new one, where you can sign up and post.  https://autohotkey.com

Posted

Oh my god. Thank you. Here I've been swearing for years :)

 

 

I only know because I did the same!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...