Jump to content
LaunchBox Community Forums

Recommended Posts

  • 1 year later...
Posted (edited)

Ok.  Got it solved.  That last thread from LordMonkus was the charm.  Just change the .exe to the one you want to close.  Thanks. 
 

$ESC::WinClose, ahk_exe higan.exe
Edited by latin625
  • 1 month later...
  • 2 months later...
Posted

This doesn't work for Yuzu. I've tried everything, I literally mean everything. Hitting escape just goes to windowed mode and then I have to press ctrl+q.

Alt f4 does work but I'd like to use escape like all my other platforms.

Can't I map ctrl + f4 to escape or ctrl + q ?

Cheers my friend

Posted
17 minutes ago, meecob said:

This doesn't work for Yuzu. I've tried everything, I literally mean everything. Hitting escape just goes to windowed mode and then I have to press ctrl+q.

Alt f4 does work but I'd like to use escape like all my other platforms.

Can't I map ctrl + f4 to escape or ctrl + q ?

Cheers my friend

Try this in the "Running Script" section. (Copy and paste) This works for me with Yuzu and several other emulators. Then, you can press ESC to exit out of games.

; This section closes Yuzu when pressing Escape
$Esc::
{
    Process, Close, {{{StartupEXE}}}
}

Posted
23 hours ago, bundangdon said:

Try this in the "Running Script" section. (Copy and paste) This works for me with Yuzu and several other emulators. Then, you can press ESC to exit out of games.

; This section closes Yuzu when pressing Escape
$Esc::
{
    Process, Close, {{{StartupEXE}}}
}

I just typed a really long winded message and it didn't submit my reply.

I doesn't work for me. It just takes me back to windowed mode. Control Q does work fine but I wish to use Escape.

The bit where I said "I've tried everything, I literally mean everything" I meant it.

Thanks for trying.

 

Posted
3 hours ago, meecob said:

I just typed a really long winded message and it didn't submit my reply.

I doesn't work for me. It just takes me back to windowed mode. Control Q does work fine but I wish to use Escape.

The bit where I said "I've tried everything, I literally mean everything" I meant it.

Thanks for trying.

 

Both of these work  just make sure you place either in the “Running Script” tab and NOT the “Exit Script” tab

$Esc::

{

WinClose, ahk_exe {{{StartupEXE}}}

}

or you can use 

$Esc::

Send ^q

 

  • 7 months later...
Posted (edited)

Hi,

I tried most of these scripts to close most of the games. They were working flawlessly with the most but with some are not.

let me more specific, Most of "Outright Games" like, PawPatrol Adventure City Calls.

when I press physically Alt+F4 on my keyboard, the game close with no problem but not with the script !!

any help is really appreciated.

Edited by musarezeq
Posted
5 hours ago, musarezeq said:

Hi,

I tried most of these scripts to close most of the games. They were working flawlessly with the most but with some are not.

let me more specific, Most of "Outright Games" like, PawPatrol Adventure City Calls.

when I press physically Alt+F4 on my keyboard, the game close with no problem but not with the script !!

any help is really appreciated.

If you have the Steam version and are using the Steam ID# to launch the game, it's not going to work this way.  If you use the Steam game.exe to launch it, it may work.  But either way, you really should be exiting it through the games' menu (for Steam games).

If you have a console version, which emulator are you using for your game?

Posted

Thank you for your reply.

I am using the windows version.

I know it is always better to close windows games through the game menu itself, but because I found that actually easier for my kids to just press one button to switch to another game.

But the strange thing the command that I use, actually work on other games but that one is not , although it can still be closed by pressing the Alt+F4 on keyboard!!

Posted
3 hours ago, musarezeq said:

But the strange thing the command that I use, actually work on other games but that one is not , although it can still be closed by pressing the Alt+F4 on keyboard!!

Since it's a Windows game and you're not using an emulator, how exactly are you setting up the command?  I assume an AutoHotkey script launched via an Additional App.  What does your script look like?  Are you trying to set it to a key on the keyboard (i.e. ESC)?  Or a button on a controller?  Both?

Posted

I am trying to set it to ESC key on keyboard.

My following script is working fine with "Race with Ryan" game. I used the same script for the Paw Patrol game (with changing the RaceWithRyan.exe to PPMT.exe) name but with no success.

 

$Esc::
{
    Run, E:\Emulators\Xpadder 2013 work well\Xpadder.exe /C
    Process, Close, {{{StartupEXE}}}
}
{
WinClose, ahk_exe RaceWithRyan.exe
}
Send, !{F4}
Escape::
ExitApp
Return

 

And I used also the more simple one which is:

$Esc::
Send, !{F4}

but also not work. But as I said when this script fails to close the required game (Paw Patrol), I pressed the Alt+F4 on keyboard and the game close directly.

 

I really appreciate your time spending reading my messages , so please don't bother yourself in that issue. I already teach my kid how to use Alt+F4 to close the game. Don't worry!! 😅

 

  • Game On 1
  • 3 months later...
Posted
On 9/30/2022 at 5:51 AM, musarezeq said:

 

 

I really appreciate your time spending reading my messages , so please don't bother yourself in that issue. I already teach my kid how to use Alt+F4 to close the game. Don't worry!! 😅

 

You ever got this to work?

Posted
9 hours ago, Kinglifer said:

You ever got this to work?

Actually no. I have no idea why it fails. I tried on different PCs but with no success.

 

Any help is really appreciated.

  • 2 weeks later...
  • 4 months later...
Posted
10 hours ago, Truest1 said:

Hey guys a need a ahk script to long press esc key sends alt+F4 . Anyone can help please? 

Or maybe hold 1 key and esc sends alt+F4? 

 

try this out. it works for me

Esc::				                        
KeyWait, Esc, T3		                        ;wait to see if esc key is held down for 3 seconds ("T3" = Time/duration of 3 seconds)
If (ErrorLevel = 1) {                                   ;if pressed for 3 seconds
	Send {RAlt down}{F4 down}{F4 up}{RAlt up}       ;send Alt+F4
        KeyWait, Esc	                                ;waits for hotkey to be released, this prevents a regular keypress (esc) from being sent on release due to not being at exactly 3 secs
}
Else    		                                ;if held less than 3 seconds
        Esc::Esc                                        ;send esc as if it were a regular keypress
Posted
2 hours ago, skizzosjt said:

 

try this out. it works for me

Esc::				                        
KeyWait, Esc, T3		                        ;wait to see if esc key is held down for 3 seconds ("T3" = Time/duration of 3 seconds)
If (ErrorLevel = 1) {                                   ;if pressed for 3 seconds
	Send {RAlt down}{F4 down}{F4 up}{RAlt up}       ;send Alt+F4
        KeyWait, Esc	                                ;waits for hotkey to be released, this prevents a regular keypress (esc) from being sent on release due to not being at exactly 3 secs
}
Else    		                                ;if held less than 3 seconds
        Esc::Esc                                        ;send esc as if it were a regular keypress

Thank you I will try this out 

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...