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: Need Help with Auto Hot Key Script AHK  (Read 2276 times)

0 Members and 1 Guest are viewing this topic.

mccoy178

  • It's hard to work with a straight jacket on
  • Trade Count: (+9)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3127
  • Last login:September 03, 2021, 10:23:42 am
  • Go Bucks!
Need Help with Auto Hot Key Script AHK
« on: August 21, 2005, 08:49:52 pm »
Since Howard is on a leave of absence this week, we can rejoice, I would like to solve the pause problem he was having in his Johnny 5 AHK script.  When using mamewah, the J5 AHK script would tell Johnny 5 to start and be active when "P" is pushed, and exit when "P" is pushed again.   That allows the game player to see the controls for the game when paused.  The problem that is arising is that the script is not waiting long enough to again press "P", so mame is not getting unpaused like it should.  So here is the question:

In the script below, what can be added to the "P" command to give mame the time needed to unpause?

~P up::
{
   If ScreenState =1

   {
      send, {Escape down}
      send, {escape up}
      
      SetTitleMatchMode, 2
      SetTitleMatchMode, slow
      WinActivate,MAME
      WinMaximize,MAME
      WinActivate,MAME
      ControlFocus, ,MAME
      send, {p down}{p up}
      
      ScreenState=0
      
   }
   else
   {
      J5=Johnny5.exe %1% -cloneof %2%
      
      Run,%J5%, G:\Development DON'T ERASE\sources\Controls Viewer3\, max
      ScreenState=1   
   }
}
return
~Escape::
if ScreenState=1
{
      SetTitleMatchMode, 2
      SetTitleMatchMode, slow
      WinActivate,MAME
      WinMaximize,MAME
      WinActivate,MAME
      ControlFocus, ,MAME
      send, {p down}{p up}
      
      ScreenState=0
}
else
{
   ExitApp ; Assign a hotkey to terminate this script.
}

return

Tiger, maybe you could help clarify what's going on here. Also, the official thread about this AHK can be found here:
http://fe.donkeyfly.com/forum/index.php?topic=162.0
« Last Edit: August 21, 2005, 08:52:10 pm by mccoy178 »

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Need Help with Auto Hot Key Script AHK
« Reply #1 on: August 22, 2005, 07:45:44 am »
Tiger, maybe you could help clarify what's going on here. Also, the official thread about this AHK can be found here:
http://fe.donkeyfly.com/forum/index.php?topic=162.0
No more than what I told you privately, except the following:

The script needs the following changes (suggested by 2600)(with the version of Johnny posted Saturday in the FE Dev forum)(data in red needs to be modified for your version:

#SingleInstance force
#Persistent
; The asterisk prefix makes the remapping more complete on XP/2k/NT. For 9x systems you can remove it.

~P up::
{
   If ScreenState =1

   {
      send, {Escape down}
      send, {escape up}
      WinActivate,%Title%
      WinMaximize,%Title%
      WinActivate,%Title%
      ControlFocus, ,%Title%

      send, {p down}{p up}
      
      ScreenState=0
      
   }
   else
   {
      WinGetActiveTitle, Title
      J5=Johnny5.exe %1% -ahk, max
      Run,%J5%, C:\Johnny
      ScreenState=1   
   }
}
return
~Escape::
if ScreenState=1
{
      WinActivate,%Title%
      WinMaximize,%Title%
      WinActivate,%Title%
      ControlFocus, ,%Title%

      send, {p down}{p up}
      
      ScreenState=0
}
else
{
   ExitApp ; Assign a hotkey to terminate this script.
}

return

Howard posted yesterday in the Johnny5 WIP thread that he would like to release a test version today.  I'd prefer to wait for that before monkeying with the script anymore.  He suggested previously that the timing settings will need to be "tweaked" for different CPU processor speeds, but I don't know if that will still be the case.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.