Hotkey to Quit Elden Ring (PC)

Post gaming related scripts
capeably
Posts: 47
Joined: 10 Jul 2014, 14:38

Hotkey to Quit Elden Ring (PC)

16 Mar 2022, 09:55

For ye Tarnished seeking a quick exit from Elden Ring on PC...

Easily one of the most annoying things about the game's UI: it takes no less than 7 keystrokes/button presses just to quit the game to the Start menu.

MUCH more satisfying to do that with a hotkey.

I'm just an AutoHotkey novice, but this is a very simple standalone script for sending the keystrokes to exit to Start screen when pressing: Win + F11. Please note:
  • This hotkey only triggers when Elden Ring is the active window.
  • This will not work if you are in any menus. Exit any menus before using script.
  • This does *not* exit the game completely, but only takes you to the Start Screen.
  • Only *after* you see the Start Screen can you safely hit "Alt+F4" to exit the game.
  • If you're having problems, try using longer wait "Sleep" times. This can vary from PC to PC.
  • This script has to be running BEFORE you press the hotkey (This might not be obvious to new AHK users)
  • It does NOT work if you just send the keys directly (e.g. Send, {Esc} does NOT work). You have to record the "down" and "up" states of all the buttons separately (as I've done in this script).
For anyone new to AutoHotkey: you can change the hotkey from Win+F11 to whatever works better for you following instructions here.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
SetTitleMatchMode, 2

#IfWinActive, ELDEN RING™

#F11::
Send, {Escape Down}
Sleep 50
Send, {Escape Up}
Sleep 200

Send, {Up Down}
Sleep 50
Send, {Up Up}
Sleep, 500

Send, {e down}
Sleep 50
Send, {e up}
Sleep, 100

Send, {z down}
Sleep 50
Send, {z up}
Sleep, 100

Send, {e down}
Sleep 50
Send, {e up}
Sleep, 100

Send, {Left Down}
Sleep 50
Send, {Left Up}
Sleep, 500

Send, {e down}
Sleep 50
Send, {e up}
Sleep, 100

return

#IfWinActive
Hope this helps someone!

====================
**Update 05-13-22**

I'm using a revised version of the script now that is a lot faster, and utilizes Subs and expression variables. I like this approach a lot better because it sets you up to be able to use the same subroutines for other keystroke sequences. It's a lot easier to just type "GoSub, PressZ" than it is to send the "Down" and "Up" states with Sleep/Wait periods in between.

You can edit the values of the Delay times at the top. These are the values that are working for me right now.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

; ======== DELAY/SLEEP SETTINGS ===========

KeyStateDelay := 25 ; Minimum delay between Key States (down or up)
MenuDelay := 50 ; Min. Delay for switching between menus
MinDelay := 25 ; Minimum delay between keystrokes

; ======== Exit to Main Menu ===========

#IfWinActive, ELDEN RING™

#F11::

GoSub, PressEsc
	Sleep MenuDelay
GoSub, PressUp
GoSub, PressE
	Sleep MenuDelay
GoSub, PressZ
	Sleep MenuDelay
GoSub, PressE
GoSub, PressLeft
GoSub, PressE
Return

#IfWinActive

; ========= SUBS ===========

PressEsc:
	Send, {Escape Down}
	Sleep KeyStateDelay
	Send, {Escape Up}
	Sleep MinDelay
	Return

PressE:
	Send, {e Down}
	Sleep KeyStateDelay
	Send, {e Up}
	Sleep MinDelay
	Return

PressZ:
	Send, {z Down}
	Sleep KeyStateDelay
	Send, {z Up}
	Sleep MinDelay
	Return

PressUp:
	Send, {Up Down}
	Sleep KeyStateDelay
	Send, {Up Up}
	Sleep MinDelay
	Return

PressDown:
	Send, {Down Down}
	Sleep KeyStateDelay
	Send, {Down Up}
	Sleep MinDelay
	Return

PressRight:
	Send, {Right Down}
	Sleep KeyStateDelay
	Send, {Right Up}
	Sleep MinDelay
	Return

PressLeft:
	Send, {Left Down}
	Sleep KeyStateDelay
	Send, {Left Up}
	Sleep MinDelay
	Return
Last edited by capeably on 13 May 2022, 22:53, edited 1 time in total.
Morshu
Posts: 1
Joined: 04 Apr 2022, 14:36

Re: Hotkey to Quit Elden Ring (PC)

04 Apr 2022, 14:37

Doesnt work. Tried everything but it does fuck all.
Setari
Posts: 4
Joined: 24 Apr 2016, 18:53

Re: Hotkey to Quit Elden Ring (PC)

06 Apr 2022, 19:17

Works for me but it's not fast enough for the pegasus (torrent flying) glitch, how do I make the script do keypresses faster? I tried changing the sleep to 1, doesn't do it. Edit: Nvm had to reload script
Royalthyl
Posts: 3
Joined: 07 Apr 2022, 20:21
Contact:

Re: Hotkey to Quit Elden Ring (PC)

08 Apr 2022, 02:51

I wanted to learn AutoHotkey v2, so I converted your script to v2.

Code: Select all

;V2 4/7/2022

#HotIf WinActive("ELDEN RING™")
#f11::
{
Send "{Escape down}"
Sleep 50
Send "{Escape up}"
Sleep 200

Send "{Up down}"
Sleep 50
Send "{Up up}"
Sleep 500

Send "{e down}"
Sleep 50
Send "{e up}"
Sleep 100

Send "{z down}"
Sleep 50
Send "{z up}"
Sleep 100

Send "{e down}"
Sleep 50
Send "{e up}"
Sleep 100

Send "{Left down}"
Sleep 50
Send "{Left up}"
Sleep 500

Send "{e down}"
Sleep 50
Send "{e up}"
Sleep 100
}

#HotIf
f4::
{
MsgBox("closing script")
ExitApp
}
I also made a version that quits out significantly faster.

Code: Select all

;V2 4/8/2022

#HotIf WinActive("ELDEN RING™")
#f11::
{
Send "{Escape down}"
Sleep 25
Send "{Escape up}"

Send "{Up down}"
Sleep 25
Send "{Up up}"
Sleep 50

Send "{e down}"
Sleep 25
Send "{e up}"
Sleep 75

Send "{z down}"
Sleep 25
Send "{z up}"
Sleep 25

Send "{e down}"
Sleep 25
Send "{e up}"
Sleep 50

Send "{Left down}"
Sleep 30
Send "{Left up}"
Sleep 50

Send "{e down}"
Sleep 25
Send "{e up}"
}

#HotIf
f4::
{
MsgBox("closing script")
ExitApp
}
The final one I made is to do the horse glitch (must already be on horseback when activating).

Code: Select all

;V2 4/8/2022

#HotIf WinActive("ELDEN RING™")
#f11::
{

;Horse part (must already be on horseback)
;Sprinting
Send "{w down}"
Send "{Space down}"
Sleep 50
;Leaping Dismount
Send "{x down}"
Sleep 25
Send "{x up}"
Send "{w up}"
Send "{Space up}"
;Quitout can be too fast and mess up the glitch
Sleep 275

;Menu quitout
Send "{Escape down}"
Sleep 25
Send "{Escape up}"

Send "{Up down}"
Sleep 25
Send "{Up up}"
Sleep 50

Send "{e down}"
Sleep 25
Send "{e up}"
Sleep 75

Send "{z down}"
Sleep 25
Send "{z up}"
Sleep 25

Send "{e down}"
Sleep 25
Send "{e up}"
Sleep 50

Send "{Left down}"
Sleep 30
Send "{Left up}"
Sleep 50

;Confirms quitout, comment out lines below to speed up testing
Send "{e down}"
Sleep 25
Send "{e up}"
}

#HotIf
f4::
{
MsgBox("closing script")
ExitApp
}
griffy
Posts: 1
Joined: 11 Apr 2022, 06:52

Re: Hotkey to Quit Elden Ring (PC)

11 Apr 2022, 06:54

This isn't working for me.
I'm new to autohotkey, maybe I'm not using ver2 and the last script above needs v2?
Help please :)

*** Update, the game quits, just not fast enough for Torrent to be glitched. I'm stood there on my own! ***
Sirius
Posts: 1
Joined: 12 Apr 2022, 23:41

Re: Hotkey to Quit Elden Ring (PC)

12 Apr 2022, 23:44

Royalthyl wrote:
08 Apr 2022, 02:51
I wanted to learn AutoHotkey v2, so I converted your script to v2.

Code: Select all

;V2 4/7/2022

#HotIf WinActive("ELDEN RING™")
#f11::
{
Send "{Escape down}"
Sleep 50
Send "{Escape up}"
Sleep 200

Send "{Up down}"
Sleep 50
Send "{Up up}"
Sleep 500

Send "{e down}"
Sleep 50
Send "{e up}"
Sleep 100

Send "{z down}"
Sleep 50
Send "{z up}"
Sleep 100

Send "{e down}"
Sleep 50
Send "{e up}"
Sleep 100

Send "{Left down}"
Sleep 50
Send "{Left up}"
Sleep 500

Send "{e down}"
Sleep 50
Send "{e up}"
Sleep 100
}

#HotIf
f4::
{
MsgBox("closing script")
ExitApp
}
I also made a version that quits out significantly faster.

Code: Select all

;V2 4/8/2022

#HotIf WinActive("ELDEN RING™")
#f11::
{
Send "{Escape down}"
Sleep 25
Send "{Escape up}"

Send "{Up down}"
Sleep 25
Send "{Up up}"
Sleep 50

Send "{e down}"
Sleep 25
Send "{e up}"
Sleep 75

Send "{z down}"
Sleep 25
Send "{z up}"
Sleep 25

Send "{e down}"
Sleep 25
Send "{e up}"
Sleep 50

Send "{Left down}"
Sleep 30
Send "{Left up}"
Sleep 50

Send "{e down}"
Sleep 25
Send "{e up}"
}

#HotIf
f4::
{
MsgBox("closing script")
ExitApp
}
The final one I made is to do the horse glitch (must already be on horseback when activating).

Code: Select all

;V2 4/8/2022

#HotIf WinActive("ELDEN RING™")
#f11::
{

;Horse part (must already be on horseback)
;Sprinting
Send "{w down}"
Send "{Space down}"
Sleep 50
;Leaping Dismount
Send "{x down}"
Sleep 25
Send "{x up}"
Send "{w up}"
Send "{Space up}"
;Quitout can be too fast and mess up the glitch
Sleep 275

;Menu quitout
Send "{Escape down}"
Sleep 25
Send "{Escape up}"

Send "{Up down}"
Sleep 25
Send "{Up up}"
Sleep 50

Send "{e down}"
Sleep 25
Send "{e up}"
Sleep 75

Send "{z down}"
Sleep 25
Send "{z up}"
Sleep 25

Send "{e down}"
Sleep 25
Send "{e up}"
Sleep 50

Send "{Left down}"
Sleep 30
Send "{Left up}"
Sleep 50

;Confirms quitout, comment out lines below to speed up testing
Send "{e down}"
Sleep 25
Send "{e up}"
}

#HotIf
f4::
{
MsgBox("closing script")
ExitApp
}
Hi. This script doesn't work on V1?
As for using V2, you need to convert with ahk2?
I get error at line 3, with the #HotIf WinActive("ELDEN RING™")", doesn't recognize the action. Any fix for this? Same with the other line that contains with hotif winactive.
Royalthyl
Posts: 3
Joined: 07 Apr 2022, 20:21
Contact:

Re: Hotkey to Quit Elden Ring (PC)

14 Apr 2022, 14:53

Sirius wrote:
12 Apr 2022, 23:44

Hi. This script doesn't work on V1?
As for using V2, you need to convert with ahk2?
I get error at line 3, with the #HotIf WinActive("ELDEN RING™")", doesn't recognize the action. Any fix for this? Same with the other line that contains with hotif winactive.
Correct, my script does not work for V1 of AutoHotkey. The original poster's script does. All scripts made with V1 would need to be converted to V2, or you can just have both V1 and V2 installed.
Royalthyl
Posts: 3
Joined: 07 Apr 2022, 20:21
Contact:

Re: Hotkey to Quit Elden Ring (PC)

14 Apr 2022, 15:01

griffy wrote:
11 Apr 2022, 06:54
This isn't working for me.
I'm new to autohotkey, maybe I'm not using ver2 and the last script above needs v2?

*** Update, the game quits, just not fast enough for Torrent to be glitched. I'm stood there on my own! ***
If you go to the home page of this website, you can click download and then V2 beta. I recommend having both V1 and V2 installed since you can't use old V1 scripts in V2.

I posted 3 separate scripts, the 3rd script will glitch Torrent for you if you use it while already on horseback, and the 2nd script is also a fast enough quitout for the glitch. The first script is not fast enough to do the glitch, so I do not recommend using it for that.
Lowenheart
Posts: 1
Joined: 20 Apr 2022, 15:29

Re: Hotkey to Quit Elden Ring (PC)

20 Apr 2022, 15:34

I've never used auto hotkeys and don't know much about them. can someone explain to me how to do it all?
smurph12345
Posts: 1
Joined: 24 Apr 2022, 18:54

Re: Hotkey to Quit Elden Ring (PC)

24 Apr 2022, 19:08

Thanks for the macro this is really helpful cuz im shit a menuing

Im trying to use this to do the Farum Azula Wrongwarp and cant get the timing right

@Royalthyl thanks for the Pegasus macro couldn't get that to work before its fun flying around
and also if you feel like adding on to your edits of the macro i would greatly appreciate help with wrong warping
tottally not a bot
Posts: 1
Joined: 27 Apr 2022, 19:24

Re: Hotkey to Quit Elden Ring (PC)

27 Apr 2022, 19:28

Royalthyl wrote:
08 Apr 2022, 02:51
I wanted to learn AutoHotkey v2, so I converted your script to v2.
How do you run scripts on v2? i downloaded the v2 beta but it doesn't seem to let me open scripts, or if it does i don't know how to make them work.
capeably
Posts: 47
Joined: 10 Jul 2014, 14:38

Re: Hotkey to Quit Elden Ring (PC)

13 May 2022, 21:21

Thanks for sharing your v2 scripts, @Royalthyl! I didn't even know anything about the Torrent glitch. 😂
Cahine
Posts: 1
Joined: 22 May 2022, 05:11

Re: Hotkey to Quit Elden Ring (PC)

22 May 2022, 05:14

Hi Guys.
Sorry, kind of noob here.
Every version of those script (regardless of AHK v1 or 2) blocks me on the Game Option, and it kinds of switch the "Toggle Auto Lock on".
With first version of script ? triend to increse (x2) delay, but no change.

Any advise ?
capeably
Posts: 47
Joined: 10 Jul 2014, 14:38

Re: Hotkey to Quit Elden Ring (PC)

22 May 2022, 07:10

Hmm. The best way I’ve found to troubleshoot if it’s not working is to just take it one key press at a time. Maybe even make the wait time “750” just to be sure it’s not a timing problem. Then I usually figure out where the problem is.

Return to “Gaming Scripts (v1)”

Who is online

Users browsing this forum: No registered users and 7 guests