I need to send "get shield" immediately after "stop", but I can't work out how the second command needs to be added in.
Help?
-- button 2
{
icon = "stopgetshield.png",
tooltip = "STOP/GET SHIELD",
send = "stop",
},
Simplest way is to build in a linebreak:
-- button 2
{
icon = "stopgetshield.png",
tooltip = "STOP/GET SHIELD",
send = "stop\nget shield",
},
The character \n is a "newline" which means it turns the string into multiple lines. Put as many of those in as you need.
Another way is Lua multiple-line strings:
-- button 2
{
icon = "stopgetshield.png",
tooltip = "STOP/GET SHIELD",
send = [[
stop
get shield]],
},
Sorry for dragging up an older post. Referring the code snippet:
-- button 2
{
icon = "stopgetshield.png",
tooltip = "STOP/GET SHIELD",
send = [[
stop
get shield]],
},
How would I add another command after 'get shield' which was already a pre-defined alias please?
I currently use Execute; Does that mean I need to leave the Send and issue the Execute?
Thanks.
The commands are sent to Execute, and thus aliases will be captured.
So if your alias was "blah" just change it to:
send = [[
stop
get shield
blah]],
Excellent. Thanks for the clarification, Nick.