Lordmonkus Posted July 1, 2017 Share Posted July 1, 2017 I want to have a single thread for this so please share your useful and interesting AHK scripts here. Provide a short description of what the script does put the script in the post using the code function (the <> at the top of the post box). Launch Higan in fullscreen mode since not all versions of Higan has a command line parameter to do this: #NoEnv Sleep, 3000 SetKeyDelay, -1, 110 Send {F11} Return Universal close emulator with the Escape key, useful for ePSXe: $Esc:: { Process, Close, {{{StartupEXE}}} } Hide your mouse cursor for certain emulators that don't hide your mouse, change the numbers to match your monitors resolution: MouseMove, 1920, 1080 Here is a script from @Reynbow that closes out the Higan emulator properly so that it doesn't lose your save game data. $ESC::WinClose, ahk_exe higan.exe 3 1 Quote Link to comment Share on other sites More sharing options...
Retro808 Posted July 1, 2017 Share Posted July 1, 2017 AHK script for Xarcade tankstick users to exit emulators that do not have internal binding options since Xarcade simulates key strokes. It is modified from the script in this post Script is set to use Player 4 start button and Player 2 start button as exit. Hold P4 and P2 for more than 2 seconds. Simply change "4" and/or "2" to the key of choice if you desire to use an alternate button key. This is using default Xarcade layout. Also you can lengthen or shorten the duration you have to hold the combo by changing "Duration > 2" (this is seconds) ~4 & 2:: Duration=0 Loop { Duration ++ If !GetKeyState("4","P") || !GetKeyState("2","P") Break If Duration > 2 { WinClose, ahk_exe {{{StartupEXE}}} break } Sleep, 1000 } return 1 Quote Link to comment Share on other sites More sharing options...
ckp Posted July 1, 2017 Share Posted July 1, 2017 In some emulators with some LB versions, this ahk line might crash or exit BB when exiting the game or cause something else undesirable (it is rare though): Process, Close, {{{StartupEXE}}} If that happens, one of these other options should solve the problem: For Demul: $Esc:: { WinClose, ahk_class window ahk_exe demul.exe } For Retroarch: $Esc:: { WinClose, ahk_class RetroArch } For Dolphin: $Esc:: { WinClose, ahk_class wxWindowNR } Quote Link to comment Share on other sites More sharing options...
ckp Posted July 1, 2017 Share Posted July 1, 2017 In case you want to hide the mouse pointer and have nomousy.exe, you can add this ahk code to your emulator's AutoHotkey Script tab (example is for Demul since that one often needs this): Run, R:\LaunchBox\Games\Tools\nomousy.exe /hide $Esc:: { Run, R:\LaunchBox\Games\Tools\nomousy.exe WinClose, ahk_class window ahk_exe demul.exe } Just change the path to where you put your nomousy.exe file. Quote Link to comment Share on other sites More sharing options...
ckp Posted July 1, 2017 Share Posted July 1, 2017 In case you want to start Xpadder.exe with an emulator's games and then exit Xpadder when exiting the game, you can add this ahk code to your emulator's AutoHotkey Script tab: Run, C:\Xpadder\Xpadder.exe /m $Esc:: { Run, C:\Xpadder\Xpadder.exe /C Process, Close, {{{StartupEXE}}} } Just change the path to where you put your Xpadder.exe file. 4 Quote Link to comment Share on other sites More sharing options...
FlawLezZ Posted July 5, 2017 Share Posted July 5, 2017 On 1-7-2017 at 3:33 AM, Retro808 said: AHK script for Xarcade tankstick users to exit emulators that do not have internal binding options since Xarcade simulates key strokes. It is modified from the script in this post Script is set to use Player 4 start button and Player 2 start button as exit. Hold P4 and P2 for more than 2 seconds. Simply change "4" and/or "2" to the key of choice if you desire to use an alternate button key. This is using default Xarcade layout. ~4 & 2:: Duration=0 Loop { Duration ++ If !GetKeyState("4","P") || !GetKeyState("2","P") Break If Duration > 2 { Process, Close, {{{StartupEXE}}} break } Sleep, 1000 } return This looks exectly something that am struggling with for the last 4 days, i have installed AHK could you explain me maybe how i can use this for example with dc emulator nulldc. How can i add this script within the emulator Sorry if this is a stupid questions Quote Link to comment Share on other sites More sharing options...
Retro808 Posted July 5, 2017 Share Posted July 5, 2017 @FlawLezZ I simply copy then paste the script into the Autohotkey tab in the Edit Emulator screen within the Launchbox options. 1 Quote Link to comment Share on other sites More sharing options...
FlawLezZ Posted July 5, 2017 Share Posted July 5, 2017 1 hour ago, Retro808 said: @FlawLezZ I simply copy then paste the script into the Autohotkey tab in the Edit Emulator screen within the Launchbox options. Much appreciated !! ill try it out in next few days !! Thanks man ! Quote Link to comment Share on other sites More sharing options...
mgerety Posted July 5, 2017 Share Posted July 5, 2017 I would love to find a way to set my Ultimark U360 analog stick to 4 way on LaunchBox launch and after a game ends. Anyone have an AHK for that, and some instruction on where to apply it? Also, best way to automatically apply U360 settings per game? I used to use hypermap with HyperSpin but am not sure how to configure it properly with LaunchBox. Thanks. Quote Link to comment Share on other sites More sharing options...
Lordmonkus Posted July 10, 2017 Author Share Posted July 10, 2017 Another "close emulator" script that sends Alt + F4 $Esc:: { Process, Close, {{{StartupEXE}}} } vk07sc000:: Send, !{F4} Return 2 1 Quote Link to comment Share on other sites More sharing options...
bundangdon Posted July 10, 2017 Share Posted July 10, 2017 17 minutes ago, lordmonkus said: Another "close emulator" script that sends Alt + F4 $Esc:: { Process, Close, {{{StartupEXE}}} } vk07sc000:: Send, !{F4} Return Thank you! This is very useful for the vice-win (Commodore computers) emulator! Quote Link to comment Share on other sites More sharing options...
Omen Posted August 10, 2017 Share Posted August 10, 2017 This will put CxBx Reloaded into full screen after launching. You can change the app title to whatever you want, to make it work with other emulators. #NoEnv WinWaitActive , Cxbx-Reloaded SetKeyDelay, -1, 110 Send {Alt Down}{Enter}{Alt Up} Return 1 Quote Link to comment Share on other sites More sharing options...
JamesBond@ge Posted October 12, 2017 Share Posted October 12, 2017 This is one that I stole from someone on here. I can't remember who it was but credit to them. Exit PCSX2 emulator: ; This section closes PCSX2 when pressing Escape $Esc:: { Process, Close, {{{StartupEXE}}} } Quote Link to comment Share on other sites More sharing options...
Adoril Posted October 13, 2017 Share Posted October 13, 2017 Using the process,close script with higan causes issues with the higan not having chance to update the save.ram file. At the moment the only solution I've found is to use the ESC:: send !{f4} But this only works if higan is not full screen. When I try and map the full screen toggle button to the AHk script it doesn't work, higan just ignores it. Is there any way to write a script to get around it? Quote Link to comment Share on other sites More sharing options...
Shalashaskka Posted October 18, 2017 Share Posted October 18, 2017 Is there any script that replaces ESC with ALT+F4 for Fusion and for ePSXe? The latter in particular gives me some trouble with disc swapping when I run it from within Launchbox. Quote Link to comment Share on other sites More sharing options...
Lordmonkus Posted October 18, 2017 Author Share Posted October 18, 2017 3 hours ago, Shalashaskka said: Is there any script that replaces ESC with ALT+F4 for Fusion and for ePSXe? The latter in particular gives me some trouble with disc swapping when I run it from within Launchbox. Try this: vk07sc000:: Send, !{F4} Return Quote Link to comment Share on other sites More sharing options...
Shalashaskka Posted October 18, 2017 Share Posted October 18, 2017 4 hours ago, lordmonkus said: Try this: vk07sc000:: Send, !{F4} Return Unfortunately, that didn't work. Escape still closes the program. Quote Link to comment Share on other sites More sharing options...
Lordmonkus Posted October 18, 2017 Author Share Posted October 18, 2017 Sorry I have nothing else then. I don't use Fusion because of the problems it has and there simply is no reason to use it when we got Retroarch and the Genesis GX core which is superior in every way. Quote Link to comment Share on other sites More sharing options...
Shalashaskka Posted October 19, 2017 Share Posted October 19, 2017 12 hours ago, lordmonkus said: Sorry I have nothing else then. I don't use Fusion because of the problems it has and there simply is no reason to use it when we got Retroarch and the Genesis GX core which is superior in every way. Well, Fusion I don't really care about. Not doing much disc swapping on that emulator. My primary concern is trying to stop ePSXe from closing every time I hit ESC, since that's the key bound to bringing up the menu and selecting what rom it's reading. But thanks for the help regardless. Quote Link to comment Share on other sites More sharing options...
Lordmonkus Posted October 19, 2017 Author Share Posted October 19, 2017 I do the same for PS1 emulation, I use Retroarch over ePSXe. I have no idea what sort of CPU you have in your system and if it would be capable of Retroarch for PS1, I do know though that ePSXe is faster on lower end spec hardware because my HTPC cannot handle Retroarch for PS1. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.