Cesomark Posted August 10, 2014 Share Posted August 10, 2014 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 More sharing options...
Grimtongue Posted August 11, 2014 Share Posted August 11, 2014 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 More sharing options...
Cesomark Posted August 12, 2014 Author Share Posted August 12, 2014 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 More sharing options...
Grimtongue Posted August 12, 2014 Share Posted August 12, 2014 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}returnThis 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 More sharing options...
Cesomark Posted August 13, 2014 Author Share Posted August 13, 2014 Thanks grimtongue this works. But its still wierd.. sometimes it just simply alt+tabs out of the game without pressing tab before the sleep.Like 50% of the times.. do u know why? Link to comment Share on other sites More sharing options...
Grimtongue Posted August 13, 2014 Share Posted August 13, 2014 The sleep delay is not long enough if the macro only works 50% of the time. Try using a higher number, such as "Sleep 500" or "Sleep 750" Link to comment Share on other sites More sharing options...
Recommended Posts
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.