Hello,
To run Game and Watch exes, I'v tried something simple working:
In the same folder than the games: a ahk script by game:
Run, E:\Nintendo\Game & Watch\Jeux\Banana\Banana.exe
Esc::
Process, Close, Banana.exe
ExitAPP
return
Anyone knows how to add run Xpadder before launching the game and close Xpadder after closing the game?
Something like Runwait?
Thanks and regards,
Hyperspin Game and watch
Re: Hyperspin Game and watch
Hi doohan and welcolme to the AHK community
Ruwait is actually a relevant option in this case. Here's a commented example using notepad (as Xpadder):
Hope this helps.
Ruwait is actually a relevant option in this case. Here's a commented example using notepad (as Xpadder):
Code: Select all
WM_SYSCOMMAND := "0x112", SC_CLOSE := "0xF060" ; values used with PostMessage below - see WinClose > remarks in the documentation
#Persistent ; to keep a script that contains only timers running
SetTimer, mySubroutine, -1 ; runs a timer (a negative period like -1 make the timer run only once). The purpose of running such a timer is here to open a new thread and that way prevent the code beneath - if any - from being postponed by the runwait command
run, %A_WinDir%\system32\notepad.exe,, Min, PID ; runs notepad and stores its unique process ID (PID) in 'PID'; min will run it minimized
; some code...
return ; end of the auto-execute part of the script
mySubroutine: ; subroutine executed by the timer
WinWait, ahk_pid %PID% ; waits until notepad window exists
runwait, "E:\Nintendo\Game & Watch\Jeux\Banana\Banana.exe"
PostMessage, %WM_SYSCOMMAND%, %SC_CLOSE%,,, ahk_pid %PID% ; less forcefull than process, close - similar in effect to pressing Alt-F4 or clicking the window's close button in its title bar.
ExitApp
Who is online
Users browsing this forum: slowwd and 144 guests