Icon_Bar

Posted by Digitalzyn on Thu 13 Jan 2022 08:17 PM — 2 posts, 12,104 views.

#0
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
Australia Forum Administrator #1
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.