Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: How to remap the Pause/Break key to another key using Auto Hot Key?  (Read 6625 times)

0 Members and 1 Guest are viewing this topic.

Wade007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 309
  • Last login:April 06, 2017, 01:33:35 pm
  • A MAME cabinet at home is heaven
    • bit.ly/1cWnoIC
    • Cheapskategamer.com
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.
My Super Arcade cabinet project:
Software blog article: http://bit.ly/1cWnoIC

Hardware blog article: http://bit.ly/1dWxjvP

YouTube video: http://bit.ly/1N818Xm

Super Arcade Cabinet Progress thread (Now Complete):
http://forum.arcadecontrols.com/index.php/topic,123292.0.html

Frontend Video Intro: http://bit.ly/1P9HPDN

nitz

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 507
  • Last login:November 24, 2015, 07:57:29 pm
Re: How to remap the Pause/Break key to another key using Auto Hot Key?
« Reply #1 on: July 01, 2012, 09:50:21 pm »
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:

Wade007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 309
  • Last login:April 06, 2017, 01:33:35 pm
  • A MAME cabinet at home is heaven
    • bit.ly/1cWnoIC
    • Cheapskategamer.com
Re: How to remap the Pause/Break key to another key using Auto Hot Key?
« Reply #2 on: July 01, 2012, 11:39:37 pm »
Thanks again nitz for your reply. I entered exactly the code you listed but it still isn't working. Could it be something else?
My Super Arcade cabinet project:
Software blog article: http://bit.ly/1cWnoIC

Hardware blog article: http://bit.ly/1dWxjvP

YouTube video: http://bit.ly/1N818Xm

Super Arcade Cabinet Progress thread (Now Complete):
http://forum.arcadecontrols.com/index.php/topic,123292.0.html

Frontend Video Intro: http://bit.ly/1P9HPDN

Wade007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 309
  • Last login:April 06, 2017, 01:33:35 pm
  • A MAME cabinet at home is heaven
    • bit.ly/1cWnoIC
    • Cheapskategamer.com
Re: How to remap the Pause/Break key to another key using Auto Hot Key?
« Reply #3 on: July 06, 2012, 06:32:24 pm »
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

I believe the fully correct solution to my situation is use the following AHK code:

; Use a hotkey
s::SendInput, {Pause}
My Super Arcade cabinet project:
Software blog article: http://bit.ly/1cWnoIC

Hardware blog article: http://bit.ly/1dWxjvP

YouTube video: http://bit.ly/1N818Xm

Super Arcade Cabinet Progress thread (Now Complete):
http://forum.arcadecontrols.com/index.php/topic,123292.0.html

Frontend Video Intro: http://bit.ly/1P9HPDN

Wade007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 309
  • Last login:April 06, 2017, 01:33:35 pm
  • A MAME cabinet at home is heaven
    • bit.ly/1cWnoIC
    • Cheapskategamer.com
Re: How to remap the Pause/Break key to another key using Auto Hot Key?
« Reply #4 on: July 06, 2012, 08:32:31 pm »
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???
My Super Arcade cabinet project:
Software blog article: http://bit.ly/1cWnoIC

Hardware blog article: http://bit.ly/1dWxjvP

YouTube video: http://bit.ly/1N818Xm

Super Arcade Cabinet Progress thread (Now Complete):
http://forum.arcadecontrols.com/index.php/topic,123292.0.html

Frontend Video Intro: http://bit.ly/1P9HPDN

nitz

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 507
  • Last login:November 24, 2015, 07:57:29 pm
Re: How to remap the Pause/Break key to another key using Auto Hot Key?
« Reply #5 on: July 06, 2012, 08:38:14 pm »
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:

Wade007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 309
  • Last login:April 06, 2017, 01:33:35 pm
  • A MAME cabinet at home is heaven
    • bit.ly/1cWnoIC
    • Cheapskategamer.com
Re: How to remap the Pause/Break key to another key using Auto Hot Key?
« Reply #6 on: July 07, 2012, 12:04:22 am »
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

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
« Last Edit: July 07, 2012, 09:55:13 am by Wade007 »
My Super Arcade cabinet project:
Software blog article: http://bit.ly/1cWnoIC

Hardware blog article: http://bit.ly/1dWxjvP

YouTube video: http://bit.ly/1N818Xm

Super Arcade Cabinet Progress thread (Now Complete):
http://forum.arcadecontrols.com/index.php/topic,123292.0.html

Frontend Video Intro: http://bit.ly/1P9HPDN

Wade007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 309
  • Last login:April 06, 2017, 01:33:35 pm
  • A MAME cabinet at home is heaven
    • bit.ly/1cWnoIC
    • Cheapskategamer.com
Re: How to remap the Pause/Break key to another key using Auto Hot Key?
« Reply #7 on: July 07, 2012, 10:15:53 am »
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

"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.
My Super Arcade cabinet project:
Software blog article: http://bit.ly/1cWnoIC

Hardware blog article: http://bit.ly/1dWxjvP

YouTube video: http://bit.ly/1N818Xm

Super Arcade Cabinet Progress thread (Now Complete):
http://forum.arcadecontrols.com/index.php/topic,123292.0.html

Frontend Video Intro: http://bit.ly/1P9HPDN