[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  Icon_Bar

Icon_Bar

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


Posted by Digitalzyn   (3 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (23,006 posts)  [Biography] 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
[Go to top] 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.


6,662 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]