Build Your Own Arcade Controls Forum
Main => Main Forum => Topic started by: rdowdy95 on February 07, 2007, 11:39:16 pm
-
Hey guys I have been tinkering with the HOTD3 and I got it to load the game without having to go through the launcher with the following ahk script. I then converted it to an exe and it is very nice.
**********
RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, SOFTWARE\SEGA\hod3\Settings, Played, 1
Run, C:\Program Files\Sega\THE HOUSE OF THE DEAD3_EU\exe\HOD3PC.exe
Sleep, 4000
WinWaitClose, THE HOUSE OF THE DEAD 3
return
ExitApp
**********
Now what I am wanting to do is add a command in there so whenever I press the ESC key I want it to do an Alt + F4 command. This will give me a window in HOTD3 that says you sure you want to exit? yes or no. This is kind of like how HOTD2 is by default. You hit esc a window comes up making sure you want to quit.
I tried to make this script here:
**********RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, SOFTWARE\SEGA\hod3\Settings, Played, 1
Run, C:\Program Files\Sega\THE HOUSE OF THE DEAD3_EU\exe\HOD3PC.exe
Sleep, 4000
WinWaitClose, THE HOUSE OF THE DEAD 3
return
ExitApp
ESC::
Send {LAlt down}
Send {F4 down}
Send {LAlt up}
Send {F4 up}
return
**********
With this script the ESC button does great just like I want it to do. Very nice. It brings up the Quit Game confirmation which is what I want. Now the thing is when I do say YES quit the game it will leave the script running in the systray. I need to figure out a way to make it quit out the script. I tried adding an ExitApp right under the return of the Alt + F4 thing but I can't get it to terminate the script. I really would like to get that escape command in my ahk script.
-
Hey guys I have been tinkering with the HOTD3 and I got it to load the game without having to go through the launcher with the following ahk script. I then converted it to an exe and it is very nice.
**********
RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, SOFTWARE\SEGA\hod3\Settings, Played, 1
Run, C:\Program Files\Sega\THE HOUSE OF THE DEAD3_EU\exe\HOD3PC.exe
Sleep, 4000
WinWaitClose, THE HOUSE OF THE DEAD 3
return
ExitApp
**********
Now what I am wanting to do is add a command in there so whenever I press the ESC key I want it to do an Alt + F4 command. This will give me a window in HOTD3 that says you sure you want to exit? yes or no. This is kind of like how HOTD2 is by default. You hit esc a window comes up making sure you want to quit.
I tried to make this script here:
**********RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, SOFTWARE\SEGA\hod3\Settings, Played, 1
Run, C:\Program Files\Sega\THE HOUSE OF THE DEAD3_EU\exe\HOD3PC.exe
Sleep, 4000
WinWaitClose, THE HOUSE OF THE DEAD 3
return
ExitApp
ESC::
Send {LAlt down}
Send {F4 down}
Send {LAlt up}
Send {F4 up}
return
**********
With this script the ESC button does great just like I want it to do. Very nice. It brings up the Quit Game confirmation which is what I want. Now the thing is when I do say YES quit the game it will leave the script running in the systray. I need to figure out a way to make it quit out the script. I tried adding an ExitApp right under the return of the Alt + F4 thing but I can't get it to terminate the script. I really would like to get that escape command in my ahk script.
Why have you got Return in your script.... where are you telling it to return to, you don't have a subroutine loop running, there's nowhere it can return to because it never started a subroutine to return from. Think about it dude.....
Best Regards,
Julian (Fozzy The Bear)
-
Come on Fozzy give me a little break here. I just started using the ahk program. What return command are you talking about. The first one or the second one. The first ahk script one I got from here on the forums. The second one is mine. The thing is if I don't put return in there it will only do the alt + F4 thing once. The alt + F4 thing brings up a window that says are you sure you want to quit, then I can click yes or no. I would like to keep that in there. Do you have any recommendations. "Think about dude" doesn't really help me
-
When I get home tonight I am going to try this script to see if I can make it do what I want to do. Key is just getting the script to stop. Here is what I am going to try tonight. I read that a 0x112 = WM_SYSCOMMAND, 0xF060 = SC_CLOSE is like an Alt-F4 press so I am going to add that in the script. Check it out:
**********
RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, SOFTWARE\SEGA\hod3\Settings, Played, 1
Run, C:\Program Files\Sega\THE HOUSE OF THE DEAD3_EU\exe\HOD3PC.exe
Sleep, 4000
WinWaitClose, THE HOUSE OF THE DEAD 3
return
ExitApp
Escape::
PostMessage, 0x112, 0xF060,,, THE HOUSE OF THE DEAD 3
ExitApp ; Hopefully will terminate the script
return
**********
Now I am hoping that everytime I press the ESC key it will be like an Alt+F4 press so I can get the really want to quit this game option. So if I press No then press esc again the message will still pop up. If not I may put a return command under the postmessage command then maybe do a winwaitclose, then an exitapp command. Hopefully something like that will work if the other doesn't do what I want it to do.
-
"Think about it dude" doesn't really help me
OK Sorry.... I just scribbled a flow chart, I was tired last night and misread it a bit.... My fault entirely :notworthy: :notworthy:......You're on the right track with your new script, which should work and should exit the AHK exicutable but you might need to remove the first ExitApp command. The second one should then exit the script. Otherwise it may terminate before issuing the keystrokes you want.
Best Regards,
Julian (Fozzy The Bear)
-
Thanks Fozzy. I will try taking out the first exitapp command. I will troubleshoot it some tonight. That is usually how I figure out stuff, that and ask you guys here on the boards.