| Message |
It isn't that hard to do one-line scripts, however the aliases below will do it for you. Copy from between the lines, go into the alias configuration screen, and click the "paste" button.
<aliases>
<alias
match="trigoff *"
enabled="y"
send_to="12"
sequence="100"
>
<send>if enabletrigger ("%1", 0) = 0 then
colournote "white", "green", "Trigger %1 now OFF"
else
colournote "white", "red", "Trigger %1 does not exist"
end if</send>
</alias>
<alias
match="trigon *"
enabled="y"
send_to="12"
sequence="100"
>
<send>if enabletrigger ("%1", 1) = 0 then
colournote "white", "green", "Trigger %1 now on"
else
colournote "white", "red", "Trigger %1 does not exist"
end if</send>
</alias>
</aliases>
This will give you two aliases "trigon" and "trigoff". You would use them like this:
trigon attack
trigoff eat
That is, you type "trigon" (trigger on) followed by the name of the trigger you want to turn on, and "trigoff" (trigger off) followed by the name of the trigger you want to turn off.
You will get a message echoed on your screen telling you whether or not the trigger is now on or off, or if it does not exist.
To make this work, the triggers that you are turning on and off must have a label (name) which you put in the "label" box for each one. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|