Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Timer Help

Timer Help

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Agarwain   (4 posts)  Bio
Date Sun 24 Feb 2019 07:09 PM (UTC)
Message
Hello,

I'm trying to work with MUSHclient timers. What I'd like to do is create temporary one-shot timers that send to script but can also be named. DoAfterSpecial creates timers, but I cannot name them, e.g. mytimer = DoAfterSpecial(12, "myfunction()", sendto.script)

AddTimer seems to be able to name timers, but apparently cannot send them to script. AM I missing something?

If it helps, I'm trying to replicate Mudlet's tempTimer() function, which seems to be able to take variables as the timer name.

Thanks for your help!
Top

Posted by Nick Gammon   Australia  (23,166 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 24 Feb 2019 08:35 PM (UTC)
Message
With a named timer you could, after creating it, change where it is sent. However ImportXML might be simper to use:

http://www.gammon.com.au/scripts/doc.php?function=ImportXML

Also the addXML function provides a useful interface:

http://www.gammon.com.au/forum/?id=7123

In particular addxml.timer (t) lets you add a timer, where all of the possible fields (including send to location, what the sent data is, and so on) can be provided.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


10,418 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.