Bucky Posted 18 hours ago Posted 18 hours ago LB is set to read the bat file, but iit won't respond to the universal escape command I set for the emulator, I wind up having to hit Alt+F4 to exit. Would like to change that! So far my bat file says this: cd /d "%~dp0" IF NOT "%~1"=="" set rom=%~n1 DEL .\reshade-shaders\Textures\bezel.png copy .\Artwork\naomi\mvsc2u.png .\reshade-shaders\Textures\bezel.png START nomousy.exe /hide START /wait Demul07_CRTGeomMOD.exe -run=naomi -rom=mvsc2u START nomousy.exe EXIT I would like to add a line of code that enables me to assign the close/exit command Alt+F4 close to the Esc button. Quote
JoeViking245 Posted 12 hours ago Posted 12 hours ago 5 hours ago, Bucky said: I would like to add a line of code that enables me to assign the close/exit command Alt+F4 close to the Esc button. Batch files cannot detect key presses. But AutoHotkey scripts can. It might look something like this: SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #SingleInstance Force rom = %1% FileDelete, .\reshade-shaders\Textures\bezel.png FileCopy,.\Artwork\naomi\%rom%.png, .\reshade-shaders\Textures\bezel.png Run, nomousy.exe /hide RunWait, Demul07_CRTGeomMOD.exe -run=naomi -rom=%1% Run, nomousy.exe ExitApp $Esc:: { Send !{F4} } Save the file as fileName.ahk This was created 'quick-and-dirty' and has not been tested. 1 Quote
Bucky Posted 8 hours ago Author Posted 8 hours ago Yeah, this worked like a beauty! Good shit. Many Thanks! I forgot to ask I'm skimming old posts and it had me wondering... I saw another thread after posting this one indicating Alt+F4 is the same as pushing "End Process". In other words, a violent intrusive way of shutting down the emulator. I thought it was more akin to pushing "X" at the top of the window or File>Exit but then again what do I know Is it true that process is the brutal shutdown method? If so, I'd ask for a script that mimics pushing the X button at the top right of the window or File>Exits Something tells me that this isn't the case and I could be overthinking it. Please, let me know if this is a normal exit procedure if it is, this issue can be put to bed. Once again, I appreciate the fix! 1 Quote
JoeViking245 Posted 7 hours ago Posted 7 hours ago 53 minutes ago, Bucky said: I saw another thread after posting this one indicating Alt+F4 is the same as pushing "End Process". In other words, a violent intrusive way of shutting down the emulator. I thought it was more akin to pushing "X" at the top of the window or File>Exit Alt+F4, File>Exit and clicking the X in the upper right corner all close the app the same [nice] way. In AHK, Process, Close, program.exe is the brute force method for closing an app. Same as clicking End Process in Task Manager. There are a few rare cases though that this is necessary. joytokey.exe is one of them. 58 minutes ago, Bucky said: Yeah, this worked like a beauty! Good stuff. Many Thanks! Glad it worked and glad I could help. 1 Quote
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.