Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: Wade007 on July 01, 2012, 09:25:54 pm
-
I have an AHK script running to launch my Future Pinball tables in MALA. I'm trying to make the "s" key send the "Pause|Break" key command.
I'm using the following code but it doesn't seem to work:
s::Pause
All the other keystroke re-assignments work find except this one.
How can I get the S key to act like Pause|Break keystroke?
I've searched the forums, tried different options (s::Break, ss::$Pause, ss::^Pause) and looked at the AHK tutorial but can't seem to find right solution.
Any ideas? Thanks.
-
s::Pause doesn't work because Pause is a command in AHK for pausing the script's current thread. Try this instead:
s::
send {pause}
return
Cheers. :cheers:
-
Thanks again nitz for your reply. I entered exactly the code you listed but it still isn't working. Could it be something else?
-
OK, so I still couldn't get the code that nitz suggested to work so I kept digging on the net. Found this link on the AHK forums. Remapping the Pause/Break key seems to be common problem:
http://www.autohotkey.com/community/viewtopic.php?t=42220 (http://www.autohotkey.com/community/viewtopic.php?t=42220)
I believe the fully correct solution to my situation is use the following AHK code:
; Use a hotkey
s::SendInput, {Pause}
-
I spoke (wrote) too soon.
It's still not working. I'm on a Windows 7 - 64 bit OS.
The AHK support file I found says:
The following keys are NOT supported by the built-in remapping method:
The mouse wheel (WheelUp/Down/Left/Right).
Pause and Break as destination keys (since they match the names of commands).
Curly braces {} as destination keys. Instead use the VK/SC method; e.g. x::+sc01A and y::+sc01B
A percent sign (%) as a destination key. Instead use the VK/SC method.
"Return" as a destination key. Instead use "Enter".
What is the "hotstring" method mentioned in the link I found above? How would I alter this code to work with the "S" key:
; Use a hotstring
:*: ::{Pause}
What other method would there be to remap Pause/Break to another key? Does anyone know how to fix this issue?
Is it possible to remap the Pause/Break key at all? Nitz...you still there???
-
Argh, sorry I left you hanging man. :banghead: I saw that you were still having issues, but didn't have time to post right away, and then just completely forgot about it when the topic got pushed down the page a bit.
The code I posted works fine for me in a script that just has that code. Try posting your complete script and we'll see if we can figure something out. I'm on Windows 7 64-bit as well.
:cheers:
-
Thanks nitz for coming back to help me. This is real frustrating. Been looking high and low for a solution.
Maybe this is a Future Pinball issue and can't be done:
http://pinnaclegameprofiler.com/forum/showthread.php?10425-Future-Pinball (http://pinnaclegameprofiler.com/forum/showthread.php?10425-Future-Pinball)
Here's my full script:
SetWorkingDir, C:\Arcade\Future Pinball\
#SingleInstance force
Run, "Future Pinball.exe" /open "C:\Arcade\Future Pinball\Tables\%1% /play /exit
WinWait, (c)
WinWait, BSP
WinWait, Software
Sleep 500
WinActivate, ahk_class FuturePinballOpenGL
WinWaitClose, BSP
Ctrl::F1 ;Full Table View 1
LAlt::F2 ;Full Table View 2
Space::F3 ;Scrolling View 1
LShift::F4 ;Scrolling View 2
z::F5 ; Low Angle View 1
x::F6 ; Low Angle View 2
c::F7 ; Fixed View
5::F8 ; Special Views including Apron View
[::l ; Lift Ball. Required to load ball into chute on some tables.
r::Numpad8 ;To set alternate Nudge UP control. Numpad8=Nudge Up in FP preferences.
Numpad4::d ;To set alternate Nudge Right control. D=Nudge Right in FP preferences.
g::Numpad6 ;To set alternate Nudge Left control. Numpad6=Nudge Left in FP preferences.
Numpad2::f ;To set alternate Pull control. Numpad2=Pull in FP preferences.
a::Tab
s::
send {pause} ; THIS IS THE ONLY PART OF THE SCRIPT THAT DOESN'T SEEM TO WORK
return
w::PgUp ; To set Music Volume Up
]::PgDn ; To set Music Volume Down
e::Home ; To set Sound Volume Up
6::End ; To set sound Volume Down
~2 & ~4::
Send, {ESC}
Process, Close, Future Pinball.exe
ExitAPP
return
-
Alright, I didn't find the solution I expected using only AHK, but I found a workaround here:
http://www.hyperspin-fe.com/forum/showthread.php?12159-Future-pinball-mapping-key (http://www.hyperspin-fe.com/forum/showthread.php?12159-Future-pinball-mapping-key)
"High score is actually the pause/break key which AHK does not like very much."
I just mapped the middle mouse button to the pause/hiscore button WITHIN Future Pinball (under Mouse Controls on the right side), then in my AHK script used the following code:
p::MButton
This works!!!!! It's essentially the same result that I had hoped to create.