Adding triggers which send to script?

Posted by Neva on Sat 17 Jul 2004 10:07 PM — 6 posts, 22,793 views.

USA #0
Is this *possible*? 'AddTriggerEx' doesn't look like it has an option for it, and I'm trying to set up something that'll turn off an option when it catches a certain string from the game, but it needs to be turned on by a separate alias first.

I'm thinking I can just add the trigger and have the script enable/disable it instead, but it seems a little odd.
USA #1
You can create a trigger which "sends to script", AddTriggerEx has the "Sendto" field, which can be any of the normal send to values. Apparently the page isnt updated, but you can use any of the real ones.

Also (for adding triggers in general), you can use SetTriggerOption to modify triggers, or importXML too.
USA #2
See, the thing is, it says that the 'send to' ought to be a number from 0-9, and 'script' isn't included on the list of what those values mean.
USA #3
As he said, the information isn't all that up to date anyway. The values should be:

0 - World
1 - Command
2 - Output
3 - Status
4 - Notepad (New)
5 - Notepad (Append)
6 - Log file
7 - Notepad (Replace)
8 - World (delayed by speedwalk setting)
9 - Variable
10 - Execute
11 - Speedwalk
12 - Script
13 - World (Immediate)

Unfortunately, while a lot of people tweak and code triggers in the XML, the docs tend to assume that you are using the inbuilt editor, so you don't need to know the values. This is imho a bad assumption. But Mushclient's help and docs are definitely not as bad at this as stuff written for say C++ compilers.. lol Your lucky in some cases if the description makes sense, let alone knowing what the value is for a flag in one of those.
USA #4
Yay! Thanks. That's what I was looking for, exactly.
Australia Forum Administrator #5
The correct list was in GetTriggerInfo. I have amended the documentation for AddTriggerEx (on this site's online documentation) to have the same list.