Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: Moksi on October 06, 2017, 03:23:54 pm
-
ive been trying some things but i cant seem to figure out how to make Supermodel exit with a different input than the Esc button within Hyperspin
if anyone has managed it to make it work or have an supermodel ahk file or command for hyperspin that would be alot of help since i have an x-arcade
-
When in doubt alt+f4 or key command that equates to alt f4.
-
hmmm i tried to remap the esc button to key 4 ,did that with ahk didnt work
tried to set it esc :: alt + F4 but ahk doesnt recognize command
im not that good with it , maybe some one has a layout with all the right commands
-
Do this in AHK for Alt + F4
!{F4}
Obviously, with a Send or SendInput or similar in front of it.
-
Or the brutal way :
Esc::
Process, close, supermodel.exe
Change the name of the process according to what you need
-
mmm uh ok thxfor helping out first
I want to press the two flipper buttons (key 3 & 4) to quit Supermodel instead of the Esc key
if thats possible ,or one side flipper button like key 4 to quit it
how do i give that command in the supermodel ahk
i tried to play around with this ; This section closes Supermodel when pressing Escape
; This section closes Supermodel when pressing Escape
$Esc::
{
Process, Close, {{{StartupEXE}}}
}
Send, {ALTDOWN}{NDOWN}{ALTUP}
Process, Close, supermodel.exe
ExitAPP
return
i tried this $Esc::4
the keymapper ahk test sees when i press Esc as a 4 but in hyperspin it does not close supermodel
-
anybody that managed to change the exit button for supermodel in hyperspin.
It only seems to close for me with Esc which is not on the X-Arcade
With Demul the ahk works easily , only Supermodel is feisty :banghead:
-
My AHK is rusty, bit unless a guru chimes in, I can help a bit...
I don't follow all of your code. I'm not sure why any of the braces are there. None of them seem necessary. But if all the lines of code are being processed, then I guess it's OK, so don't remove them on my say-so. The one thing I know for sure you're doing wrong is your mapping of "$Esc::4". This means to send the character "4" to the program which has input focus. This is not what you asked to do. Based on what you asked for, "$Esc" should not show up anywhere in the code. You want to map the key "4" to the code which exits the emulator, so what you should have done is replace "$Esc" with "4". So again, assuming the rest of the code is fine, substitute the line "$Esc::" with the line "4::"
-
i tried that but it doesnt respond , but only Esc works
i tried a bunch of things like 4::send !{F4}
Supermodel has that Esc button Locked down :badmood:
-
argonlefou's method works for me.
Hyperspin doesn't appear to be the problem of Alt-F4 not being recognized. That appears to be an issue with Supermodel (it is not unheard-of for some programs to not work with AHK input shenanigans) I tried supermodel, and couldn't get it to close either by sending alt-F4 when "4" is pressed. Using argonlefouou's method, however, did close Supermodel. I didn't use Hyperspin, I just ran supermodel from the command line after loading an AHK script that simply consisted of
4::
Process, close, Supermodel.exe
ExitApp
I see you already have a "process, close, supermodel.exe" line, but are you sure it's getting there? It's outside a block you defined with some braces. I don't know if that's valid AHK or whether it's some kind of HS extension.
-
OK , i tried the code but it didnt work
if i run it from the commandline maybe then itll work to first remap the key in supermodel itself then it will also work in hyperspin
how do i that ?
-
'press key 3 & key 4 to exit Supermodel'
4::
if not GetKeyState("3","P")
return
Winclose, Supermodel
sleep, 1000
exitapp
-
; press key 3 & key 4 to exit Supermodel
4::
if not GetKeyState("3","P")
return
Winclose, Supermodel
sleep, 1000
exitapp
this works if i run Supermodel without Hyperspin & ahk is running
when i put this code into hyperspin keymapper it doesnt work
how can i point the ahk to run when Supermodel is functioning in hyperspin
-
i don't have hyperspin, can you show (or attach) the supermodel part ahk script from hyperspin?
-
i used that same code you posted in hyperspin but that doesnt work
i did something else i made a ahk and used your code and placed it in the windows Startup folder so it starts when win starts
& then it worked for me in HyperSpin.
But only if the ahk is running in the systray , if you use it one time it automatically closes the ahk.
So if this ahk just keeps running i should have no problem to close it with any keys , how can i keep the ahk running constant in the systray
-
; press key 3 & key 4 to exit Supermodel
4::
if not GetKeyState("3","P")
return
Winclose, Supermodel
sleep, 1000
return
works with making the ahk yourself & put it in the windows Startup folder
-
with this enabled now i have another little problem.
with this script running all the time i cant press 4 because the script has it locked
possible i can give a command to active the script when hyperspin is started en stop the script when hyperspin is closed.
and how to type that command to the script i use
-
better script....
~3 & 4::
Winclose, Supermodel
sleep, 1000
return
-
The #IfWin family of directives is what you want to use to have a hotkey in effect only when a certain program is running (#IfWinExist), or has focus (#IfWinActive)
https://autohotkey.com/docs/commands/_IfWinActive.htm (https://autohotkey.com/docs/commands/_IfWinActive.htm)
I tested this with Supermodel and it works (if I switch to Notepad, even with Supermodel running, I can type a "4". If I hit "4" on the Supermodel Window, then Supermodel exits)
#IfWinActive, Supermodel
4::
Winclose, Supermodel
sleep, 1000
return
I assume this would also work with Roberto's "~3 & 4::" substitution. You probably do want this only in effect when Supermodel is running instead of basing the hotkey on Hyperspin, unless Supermodel is the only emulator you are going to use from Hyperspin. If for some reason you do prefer to use Hyperspin as the program for AHK to look for, then you would have to use the #IfWinExist directive instead of #IfWinActive.
BTW, why the "sleep"?
-
yes :applaud: it works perfectly now.
thanks for the help!
-
Just wanted to thank for the code
#IfWinActive, Supermodel
c::
Winclose, Supermodel
It worked perfectly from my pincab as escap isnt good in the pinuppopper fronend and I have the c key to exit :D