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 ➜ Plugins ➜ Icon_Bar

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 Thu 13 Jan 2022 08:17 PM (UTC)
Message
Hello! Happy New Year :)

I have a question regarding the Icon_bar.xml.
Is there a way to create an alias to set off one of the buttons? As an example: I send 'pray' to the world by typing on the prompt and it triggers the button to show a timer as if I clicked it?

Thank you in advance. Keep up the great work.

-Zyn
Top

Posted by Nick Gammon   Australia  (23,132 posts)  Bio   Forum Administrator
Date Reply #1 on Thu 13 Jan 2022 10:16 PM (UTC)

Amended on Thu 13 Jan 2022 11:53 PM (UTC) by Nick Gammon

Message
I've amended the plugin at Icon_Bar.xml

Main Git page: https://github.com/nickgammon/plugins/blob/master/Icon_Bar.xml, diffs at: https://github.com/nickgammon/plugins/commit/93cc19ff0e95bcd7180f1613d5c3a72df57ffb21#diff-961d038942d1afc2999379b58d944e8c6b53426f2135200df792b95f70134204


That adds an alias "press icon n" where n is the number of the button on the list of buttons.

So, to "press" the first button you would type "press icon 1".

You could make an alias to do that for you, eg. "pray" is an alias that "sends to Execute" and sends "press icon 1".

Just make sure that the alias is not exactly what the button sends, or it will go into a loop, eg. the alias "pray" presses the button which sends "pray" which presses the button again, and so on.

Alternatively, in the plugin change the line:


  Execute (command)


to:


  Send (command)


That will avoid such loops, however then the thing the button sends can't be another alias.




If you download this new plugin make sure you save your current one somewhere first or it will replace all the buttons you put in the script. Then copy your button info from the old one to the new one.

- 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.


7,894 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.