The Script:
#SingleInstance force
#Persistent
; The asterisk prefix makes the remapping more complete on XP/2k/NT. For 9x systems you can remove it.
DetectHiddenWindows, On
~P::
{
If ScreenState =1
{
send, {Escape down}
send, {escape up}
WinActivate,%Title%
WinRestore,%Title%
WinActivate,%Title%
WinWaitActive,%Title%
[b]sleep 250[/b]
Send,{p down}{p up}
ScreenState=0
}
else
{
WinGetActiveTitle, Title
J5=Johnny5.exe %1% -ahk
if 0 >1
J5=%J5% -clone %2%
if 0 >2
J5=%J5% -driver %3%
Run,%J5%, G:\Development DON'T ERASE\sources\Controls Viewer3\, max
ScreenState=1
}
}
return
~Escape::
if ScreenState=1
{
WinActivate,%Title%
WinRestore,%Title%
WinActivate,%Title%
WinWaitActive,%Title%
[b]sleep 250[/b]
Send,{p down}{p up}
ScreenState=0
}
else
{
ExitApp ; Assign a hotkey to terminate this script.
}
return




