Okay, thanks, that works!
Another question, though.
Using my current system of selecting a message from the script menu, if a command is selected (eg. /nudge, /block etc.), the script sends just the message. If any other message is sent, it adds "AutoMessage:" to the start, so it sends in the Plus! auto-message format.
It does this with two variables, "setMsgPlusAM" (the user's way of turning the Plus! auto-message style on or off), and "setnoteMesCmd" (automatically turned on if the message starts with a /), which, if active, disables the "AutoMessage:" start. The code below will hopefully explain this better.
js code:
function OnEvent_Timer(TimerID)
{
Debug.Trace("Instant Response | Timer completed!");
if (setMsgPlusAM) // user's Plus! auto-message setting on
{
if (setnoteMesCmd) // if message starts with a "/" (/command)
{
Messenger.OpenChat(TimerID).SendMessage(settingMessage);
// do not add the prefix to the message
}
else
{
Messenger.OpenChat(TimerID).SendMessage("AutoMessage: " + settingMessage);
// add the prefix to the message
}
}
else
{
Messenger.OpenChat(TimerID).SendMessage(settingMessage);
// do not add the prefix to the message
}
Debug.Trace("Instant Response | Message sent!");
}
Can I set the script so that when the user types "/ir.message /command", the script can turn the "setnoteMesCmd" variable as true, so that the auto-message prefix will not be added?
Is this possible with a wildcard of some sort? Like:
js code:
if (parameter=="/" + *)
{
setnoteMesCmd = true;
}
else
{
setnoteMesCmd = false;
}