User:Valdemar/Rewall Macro
From DwarfFortressWiki
For instructions, go back to User:Valdemar
$^+Left:: ProcessEvent("Left","w")
$^+Right:: ProcessEvent("Right","w")
$^+Up:: ProcessEvent("Up","w")
$^+Down:: ProcessEvent("Down","w")
$^!Left:: ProcessEvent("Left","f")
$^!Right:: ProcessEvent("Right","f")
$^!Up:: ProcessEvent("Up","f")
$^!Down:: ProcessEvent("Down","f")
ProcessEvent(direction, type)
{
Send {Enter}
Sleep 100
Send {Enter}
Sleep 100
Send %type%
Sleep 100
Send {%direction%}
Loop
{
if not GetKeyState(direction, "P")
break
Send {Enter}
Sleep 100
Send {Enter}
Sleep 100
Send %type%
Sleep 100
Send {%direction%}
}
}

