Quick-enable plugins?

Posted by Ebondream on Mon 30 Mar 2015 10:37 AM — 3 posts, 18,085 views.

#0
Bit of a silly question probably, but if there is a particular plugin I need to activate/deactivate on a regular basis, is there any way to to create some kind of short-cut, either as a clickable button or binding a keytroke to it?
USA #1
Make 2 aliases that use EnablePlugin.

http://www.gammon.com.au/scripts/function.php?name=EnablePlugin

One true, one false.

Now put those aliases in 2 differnt Macros. So every time you press F7 lets say, it enables the plugin. Every time you press F8 lets say it disables it.

Quick and dirty but it will work. If you want to add some real scripting you can make it a true toggle and only require one macro/button. Or any other number of ways.

This should be enough to get you started however.
Australia Forum Administrator #2
On a related note, when I am testing the same plugin many times, I find it helpful to have a "reload plugin" alias (which I call "rl).

Here it is, I adapt it by changing the plugin ID and pathname as appropriate when working on different plugins:


<aliases>
  <alias
   match="rl"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>

if ReloadPlugin ("63e6909083318cf63707c044") == error_code.eNoSuchPlugin then
  check (LoadPlugin ("/program files/mushclient/worlds/plugins/example_mapper.xml"))
end

Note "plugin reloaded"

</send>
  </alias>
</aliases>



Template:pasting
For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.


First it tries to reload the plugin (in case you already have it loaded) - which handles the case of you just making a change. However if the change causes a syntax error then the plugin is not loaded any more in which case you get the return code error_code.eNoSuchPlugin. So in that case it does LoadPlugin to load it again from disk.