Sending quicksave and console commands in Skyrim Special Edition

Ask gaming related questions
capella
Posts: 2
Joined: 22 May 2018, 12:24

Sending quicksave and console commands in Skyrim Special Edition

22 May 2018, 14:21

First, I just found this tool and it looks like I can make some really great use out of it, and I did go through the tutorial before coming here.

Second, sorry for the long post, but I wanted to be as clear as possible on what I'm trying to do, what's happening and what I've tried.

What I'm trying to do: While in-game, Skyrim Special Edition (SSE), I want to be able to do two things (two different scripts).

    Save the game and then quit
    Just quit without saving the game

From SSE's console (accessed with the tilde key, ~) you can type "qqq" and press Enter and the game will instantly shut down. To quicksave a game you can hit the F5 key.

So, I want a script that will

1) Make sure SSE is running and is the active window
2) Set the key combination CTRL + q as the hotkey
3) Send the tilde key
4) Send "qqq"
5) Send the Enter key

and another script that will

1) Make sure SSE is running and is the active window
2) Set the key combination ALT + q as the hotkey
3) Send the F5 key (not sure if "send" is the correct terminology for pressing a specific key in the context of a script action, but you know what I mean) to save the game
4) Send the tilde key
5) Send "qqq"
6) Send the Enter key

Here's what my script currently looks like - this is the non-saving version:

Code: [Select all] [Download] GeSHi © Codebox Plus

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

#IfWinExist Skyrim Special Edition
^q::
Send,~
Send,qqq{Enter}
return


Some things before I explain what happens when I try to use the script:

In the game, the CTRL key is used to make the character crouch and the "q" key is used to access the character's items set a "favorites" in the inventory - a quick-access menu.

So, having said the above, when I try to use the defined hotkey combination of CTRL + q, the character crouches and then the favorites menu comes up. But while either in the game's main menu (load saves screen) or the in-game menu when I press CTRL + q, the console does come up and the three qs are typed, but that's it.

So I tried setting the hotkey combination to ALT + k - neither of which are used by the game. But when I hit that combination to fire the script, the favorites menu comes up, having detected the "q" that is sent by the script. Actually what happens is because three qs are typed the favorites menu opens, closes, then re-opens.

So I'm stumped. Maybe I just can't do what I'm trying to do, but, there is actually a script that someone created for the older version of Skyrim (found here), which, according to the description, does part of what I want, plus a lot more. I tried to dissect that, but it's way too complicated for my current (lack of) experience in AHK scripting, as it includes loops and timers and more.

I posted this question almost verbatim over at the AHK Reddit and someone there suggested I try this code but nothing changed when I tried it.

Code: [Select all] [Download] GeSHi © Codebox Plus

^q::
if WinActive("ahk_exe SkyrimSE.exe")
{
Send ~
Send qqq{Enter}
}
return
capella
Posts: 2
Joined: 22 May 2018, 12:24

Re: Sending quicksave and console commands in Skyrim Special Edition

24 May 2018, 07:40

evilC wrote:https://www.reddit.com/r/AutoHotkey/comments/8lc9me/really_confused_about_how_to_do_something/dzhu6pd/


Thanks for catching me in both places! I'll give your suggestion a shot.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 8 guests