Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: mccoy178 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
-
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.