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
➜ Plugins
➜ Icon_Bar
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Digitalzyn
(3 posts) Bio
|
Date
| Fri 10 Apr 2020 05:30 AM (UTC) Amended on Fri 10 Apr 2020 05:53 AM (UTC) by Digitalzyn
|
Message
| Hello, I have been using MUSHclient for years now and absolutely love it. I recently have installed the Icon_bar plugin and have got it working great. The only thing I can't figure out for the life of me is how to make it do something once the timer is complete. For example: if a two minute timer reaches 0. I would like to send a ColourNote to let me know the timer is up. I have tried doing this myself and keep coming up with errors. Any help would be appreciated. Thank you
Edit: I found a work around by making a second timer to fire at the same time as the timer by adding the execute command.
{
icon = "Crab.png",
tooltip = "Crabbing",
Execute = AddTimer("reelin", 0, 2, 00, " **** Get the Crabs from the Traps!! ****", timer_flag.Enabled + timer_flag.OneShot + timer_flag.TimerNote, ""),
cooldown = 120,
sound = "ding.wav"
}, -- end of button 2
Doing this seems a bit excessive. If there is an easier way I'd appreciate some help. Thanks! | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Fri 10 Apr 2020 09:17 PM (UTC) |
Message
| I’ve put the plugin onto GitHub and amended it to have a “done” function which is called when the time is up. Download from https://raw.githubusercontent.com/nickgammon/plugins/master/Icon_Bar.xml
As shown in the comments you can add a function call to the bar like this:
The function can be inline (like above) or a function elsewhere in your code. The function is passed the number of the icon bar which has reached its cooldown time.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Digitalzyn
(3 posts) Bio
|
Date
| Reply #2 on Fri 10 Apr 2020 09:36 PM (UTC) |
Message
| Now THAT is awesome. Thank you Nick. Keep up the great work! | 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.
11,175 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top