Trigger with Wait Time

Posted by Valentim on Wed 14 Aug 2013 01:56 AM — 4 posts, 20,057 views.

#0
How do I make a trigger to send a command in x seconds and if that same trigger is run again, it will cancel the previous command and send command again

Example:

Text: MushClient
Script: Wait 1000; Send something

When text "MushClient" appears, the script will wait 1 second and then will echo "Something", where text "MushClient" appear again before command echo, the both command "WAIT" and "Send " will be aborted and sent again

is possible to do this kind of trigger?
Australia Forum Administrator #1
Like this?


<triggers>
  <trigger
   enabled="y"
   match="MushClient"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>

AddTimer ("mytimer", -- timer name
          0, 0, 1,   -- hour, minute, second
          "say something",  -- what to send
          timer_flag.Enabled + timer_flag.OneShot + timer_flag.Replace + timer_flag.Temporary, -- flags
          "")  -- script

</send>
  </trigger>
</triggers>



Template:pasting
For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.
#2
Thank you, that is exactly what I was looking for... :)
#3
very useful