The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: MPTech on August 21, 2006, 11:53:31 am

Title: AutoHotKey Escape?
Post by: MPTech on August 21, 2006, 11:53:31 am
I'm at work, so I can't test it now, but is this close??

I'm using an X-Arcade CP and someone suggested mapping Player1 & Player2 (both pressed simultaneously) to the Escape.  I like this and would to set it up for anything I played via MameWAH, so AutoHotKey seemed like a great solution, rather than changing all of my .ini files.

I haven't used it before, but read the docs, so I wanted to see if I'm thinking correctly.

Is it this simple??
Num1 & Num2:: Esc    (or is it Escape?)


I did a couple searches on AutoHotKeys and found a couple others I'd also like to try.

Any other suggestions??
Title: Re: AutoHotKey Escape?
Post by: Howard_Casto on August 21, 2006, 04:52:34 pm
No you want Numpad1 & Numpad2::Esc

But unless your layout is wierd, most people map start 1 and 2 to the keyboard numbers, not the numpad numbers, in which case it would be: 

1 & 2::Esc

Now if you want it to act like an ipac in that it's a key shifted you want to use :

1 & 2 UP::Esc meaning that it doesn't fire escape unless 1 is held down, then 2 is pressed and released while 1 is still being held down.   

Your ahk exe comes with a very extensive help file which describes various syntax.  You should look at it.
Title: Re: AutoHotKey Escape?
Post by: MPTech on August 21, 2006, 07:57:38 pm
Thanks again HC!

I think I want:  1 & 2 UP::Esc


I'll try it tonite when I get home.
Title: Re: AutoHotKey Escape?
Post by: MPTech on September 05, 2006, 12:58:11 am
Thought I'd try this again, but stil not working.
I did review the help (looks like it could be a GREAT tool), but not being succesful on a simple task here.

I create a file called Esc.ahk (actually, I let the utility create it then renamed it).

I entered one line in the first blank line, as we discussed:
1 & 2 UP::Esc

I'm getting this message:
Quote
Error at line 11.

Line Text: Esc
Error: This line does not contain a recognized action.

The program will exit.


I thought it might not recognize "Esc" so I changed it to "Escape" and got the same message.

Any suggestions?


Thanks!   MPTech
Title: Re: AutoHotKey Escape?
Post by: headkaze on September 07, 2006, 03:17:41 am
I think the line your looking for is..

Code: [Select]
1 & 2 Up::Send {Esc}
According to the Key List (http://www.autohotkey.com/docs/KeyList.htm) escape key can be either Esc or Escape.
Title: Re: AutoHotKey Escape?
Post by: Howard_Casto on September 07, 2006, 07:22:27 am
Yeah, there's about 3 ways to do the same thing in ahk.  For some reason depending upon the syntax that is calling the function, sometimes you can't use some of them.
Title: Re: AutoHotKey Escape?
Post by: MPTech on September 07, 2006, 03:19:28 pm
Thanks for the help (again).

Makes sense, I'll try it tonite when I get home!
 :notworthy: