Jump to content

[Autohotkey] Escape / Pause Button?


Recommended Posts

Hey guys!

 

I got a little question.

I dont know why, but when i use the hotkey for the Pause button (doesnt matter if its escape or anything else) in an autohotkey script, it doesnt work in Dont Starve.

 

This is my Script:

 

Numpad3::EscAlt() ;EscAlt(){   BlockInput On   Send, {Esc}   Sleep 50   Send, {ALTDOWN}{TAB}{ALTUP}   BlockInput Off   return}

Anyone knows why? :-)

 

 

Link to comment
Share on other sites

you are using the numberpad, that's always sketchy.  bind it to something else, such as CTRL+p

^p::EscAlt();...

sometimes AHK Send commands aren't sent to certain games, regardless of key combo, so you have to use "SendInput" instead of "Send".   The syntax for SendInput is the same as for Send

 

[edit: it's not "Send {Raw}" it should be "SendInput", sorry]

Link to comment
Share on other sites

Thanks for the reply Grimtongue but it still doesnt work.

 

I realized that the issue is not the key i have to press but its the "Pause" command.

I think that Autohotkey works in Dont Starve fine with everything but the "pause the game" commands which are "pause" (escape) and "tab" (for map).

 

The binding doesnt matter. So if i bind menu to the space bar, it also doesnt work.

 

However: one can bind several hotkeys to the same button.

For example if i bind "Do Action" and "Pause" to the spacebar, both commands apply at the same time.

But if i use the spacebar in autohotkey, only the "Do Action" command will be done.

 

Im sorry for my english, its not my native language! :)

 

Link to comment
Share on other sites

Try re-writing your code without using the "one-true-bracket" style.

 

Try this:

m::Send {TAB down}{TAB up}Sleep 250Send {ALT down}{TAB down}{TAB up}{ALT up}return

This code should bring up the Don't Starve map, then ALT+TAB when you press "m" on the keyboard.

 

[edit: fixed code.]

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...