| Message |
I didn't mean to create an alias for each speedwalk, I meant to save them all in a variable, and then have a single alias to restore that. This should work:
<aliases>
<alias
match="interrupt"
enabled="y"
send_to="12"
sequence="100"
>
<send>speedwalkQueue = World.GetQueue
If IsEmpty (speedwalkQueue) Then
SetVariable "interrupted_commands", ""
Else
oldqueue = GetVariable ("interrupted_commands")
If oldqueue <> "" Then
oldqueue = oldqueue & "~"
End If
SetVariable "interrupted_commands", oldqueue & Join (speedwalkQueue, "~")
ColourNote "white", "blue", CStr (UBound (speedwalkQueue) + 1) & " speedwalk(s) now saved."
End If
DiscardQueue
</send>
</alias>
<alias
match="restore"
enabled="y"
send_to="12"
sequence="100"
>
<send>commands_list = GetVariable ("interrupted_commands")
If commands_list <> "" Then
commands = Split (commands_list, "~")
For Each item In commands
world.Queue item, vbTrue
Next
ColourNote "white", "blue", CStr (UBound (commands) + 1) & " speedwalk(s) restored."
SetVariable "interrupted_commands", ""
Else
ColourNote "white", "blue", "No saved speedwalks."
End If
</send>
</alias>
</aliases>
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|