0

I'm extremely new to using AutoHotkey and I can not figure out how to send multiple lines of commands on a Terraria server. What I'm trying to do is make a buff quick set, for example I would press CTRL+S and the hotkey would send {Enter}/buff name 545{Enter} and go on to the next buff. I got the lines to send in a text file or Steam chat, but it will not work in Terraria.

  • 1
    Try this with any other game. I believe the steam overlay makes it difficult to do this. Also, try it with a sendkeys program. If you need one let me know and I can link you to one I made (however not for this purpose) – Jon Oct 6 '13 at 23:32
  • If you could send me it that would be much appreciated. I'll hopefully be able to examine and morph it to my needs. – user260369 Oct 7 '13 at 19:34
  • Here you go. Virus scan. You'll probably want to click "Only send once". To send the enter key use {ENTER}. – Jon Oct 7 '13 at 22:13
1

Terraria polls keys unless you're typing in the chat box. you have to hold the Enter key for 1/fps to open the chat box, type, then hold Enter again for 1/fps to send the message.

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

SendChat(msg)
{
    Send {Enter down}
    Sleep 100
    Send {Enter up}%msg%
    Sleep 100
    Send {Enter down}
    Sleep 100
    Send {Enter up}
    Sleep 100
}

MButton::
SendChat("/help 1")
SendChat("/help 2")
SendChat("/help 3")
SendChat("/help 4")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.