Jump to content
LaunchBox Community Forums

Escape .lnk files using escape?


Cnells2000

Recommended Posts

My bad, forgot this was for PC games.

Try these steps and let me know the outcome (I have not personally tested it)

  1. Download the Autohotkey package from https://www.autohotkey.com/download/, in the ZIP file is a Compiler folder. AHK2EXE is there.
  2. Convert the AHK script to an EXE and place it in the same folder where the PC game is.
  3. Add the EXE as an Additional App in Launchbox, and set it to Automatically Run Before Main Application.
  • Like 1
Link to comment
Share on other sites

1 minute ago, MCF said:

My bad, forgot this was for PC games.

Try these steps and let me know the outcome (I have not personally tested it)

  1. Download the Autohotkey package from https://www.autohotkey.com/download/, in the ZIP file is a Compiler folder. AHK2EXE is there.
  2. Convert the AHK script to an EXE and place it in the same folder where the PC game is.
  3. Add the EXE as an Additional App in Launchbox, and set it to Automatically Run Before Main Application.

ok im going to try this now. i may still have questions but thank you for responding so far sir

Link to comment
Share on other sites

I would never recommend killing native PC games like that. There is a reason PC and console games have warnings to not exit/shutdown your system when the save icon shows. Just killing it with alt F4 (which is what Launchbox will send as escape wont close most PC games) you risk corrupting your save games. Always close PC games through there in game exit menu's.

Link to comment
Share on other sites

On 5/7/2020 at 1:23 PM, Cnells2000 said:

u said convert the  AHK script. where would i get the ahk script?  its asking me to place it in the directory

This AHK script

$Esc::
{
    Process, Close, whatever the game exe is
}

Just save the above as an AHK file, and then use the AHK2EXE tool to compile it. Note the red colored section of the script needs to be changed to the name of the game executable.

However, @neil9000 is right, this is not the recommended way to exit from a PC game as the risk of corruption of your save games is high. Better to exit properly via the game's menus.

Edited by MCF
  • Like 1
Link to comment
Share on other sites

On 5/8/2020 at 1:41 AM, MCF said:

This AHK script

$Esc::
{
    Process, Close, whatever the game exe is
}

Just save the above as an AHK file, and then use the AHK2EXE tool to compile it. Note the red colored section of the script needs to be changed to the name of the game executable.

However, @neil9000 is right, this is not the recommended way to exit from a PC game as the risk of corruption of your save games is high. Better to exit properly via the game's menus.

yes i understand that. what if the file is in a single launcher file like my wacky races and madden arcade dumps?  they both have Launcher exes. i click launcher to start it, but i cant escape the emulator using the escape key. it isnt set by an emulator to run it. it only has a self launcher. where would i put the hotkey in this instance?

which tab would i paste it in? folder, other, custom fields, because once again an emulator isnt set for this rom and several others similar games to this. (not my pc games .lnk's tho)

 

 

Untitled.jpg

Untitled 2.jpg

Edited by Cnells2000
Link to comment
Share on other sites

On 5/8/2020 at 1:41 AM, MCF said:

This AHK script

$Esc::
{
    Process, Close, whatever the game exe is
}

Just save the above as an AHK file, and then use the AHK2EXE tool to compile it. Note the red colored section of the script needs to be changed to the name of the game executable.

However, @neil9000 is right, this is not the recommended way to exit from a PC game as the risk of corruption of your save games is high. Better to exit properly via the game's menus.

I would also recommend getting away from using Process, Close when using AHK with games. It is a hard close process and can mess with emulators or other .exe that save on exit as well. This was identified a little over a year ago when a user had issues with Higan and that particular AHK script.

WinClose, ahk_exe NAME OF.exe

Would be safer to use. For example:

$ESC::WinClose, ahk_exe higan.exe

 

3 hours ago, Cnells2000 said:

yes i understand that. what if the file is in a single launcher file like my wacky races and madden arcade dumps?  they both have Launcher exes. i click launcher to start it, but i cant escape the emulator using the escape key. it isnt set by an emulator to run it. it only has a self launcher. where would i put the hotkey in this instance?

which tab would i paste it in? folder, other, custom fields, because once again an emulator isnt set for this rom and several others similar games to this. (not my pc games .lnk's tho)


 What Launcher are you using? Is it one downloaded with the torrent for that game? I have Wacky Races but I just run the game.exe.

 

Link to comment
Share on other sites

i dont use a launcher for the madden arcade or my wacky races and a  few others. they just have their own separate exe. when i press escape for madden, nothing happens. when i press esc for wacky races the dipswitch settings pop up. i just want to easy close these specific type of games with escape like i do with the ones that have an emulator assigned.

and where do i place that command line you have above? i dont have an emulator assigned so i cant paste that in the AHK section tab

 

Untitled 2.jpg

Untitled.jpg

Link to comment
Share on other sites

3 minutes ago, Cnells2000 said:

i dont use a launcher for the madden arcade or my wacky races and a  few others. they just have their own separate exe. when i press escape for madden, nothing happens. when i press esc for wacky races the dipswitch settings pop up. i just want to easy close these specific type of games with escape like i do with the ones that have an emulator assigned.

and where do i place that command line you have above? i dont have an emulator assigned so i cant paste that in the AHK section tab

Untitled.jpg

You are using a launcher in Wacky Races. Your images show it. Launcher.exe is a launcher. That is what I was asking about. Did that launcher come in the download of the game files?

When not using an emulator you will not have a place to paste an AHK script. You could compile an AHK and then add it as an additional app to run. Since "Escape" will not close it you would need to find out what will? Try Alt+F4 or Ctrl+Q. Once you find out what command will close the game we can go from there.

 

 

Link to comment
Share on other sites

 

i tried Alt and F4 and that worked. so i would like that to be the esc key instead. oh and this whole folder came together in the torrent. and i dont know diddly about compiling an ahk script yet. so where do i go from here?

Edited by Cnells2000
Link to comment
Share on other sites

5 minutes ago, Cnells2000 said:

make a launcher? dont know where to begin with that. but @Retro808hopefully if ur not busy later and have time to help me whenever u get a chance, i would surely appreciate it sir. if i dont respond back today i will definitely follow up. thanks again retro

Can you confirm you are wanting to use they keyboard key "Escape" to close correct?

I am no expert on this, but have done something similar thanks to help from a couple of our resident AHK experts. I have something that should work, but can you confirm my question.

Link to comment
Share on other sites

On 5/11/2020 at 7:08 AM, Cnells2000 said:

 

Untitled.jpg

 

Can you go into the Xpadder Wacky Races folder and see if there's any EXE files in there?

Use these steps to create an AHK script

  1. Launch Notepad
  2. Copy and paste the line below in Notepad and save it as "script.ahk" in a convenient location (i.e. Desktop, Documents), as suggested by @Retro808
    $ESC::WinClose, ahk_exe your wacky races executable file
  3. Download the Autohotkey package from https://www.autohotkey.com/download/, in the ZIP file is a Compiler folder. AHK2EXE is there, this is the tool used to compile the AHK script into an EXE application
  4. The source script file is the script.ahk that was created in Step 2 above
  5. For the destination EXE file, name it as EXIT.EXE (or any other file name you like, so long as the extension is EXE) and place it in E:\Torrents\Wacky Races
  6. Click Convert
  7. Go to E:\Torrents\Wacky Races and check if EXIT.EXE has been created
  8. If yes, added EXIT.EXE as an Additional App for Wacky Races in Launchbox, and set it to Automatically Run Before Main Application
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...