Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Agent, Actions, Rules & Automation >> Agent on/off toggle stamp
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1349952662

Message started by Mark Anderson on Oct 11th, 2012, 6:51am

Title: Agent on/off toggle stamp
Post by Mark Anderson on Oct 11th, 2012, 6:51am

Generally, you just make agents and leave them all running. Just occasionally (i.e. not for most users), when doing more complex work such as using lots of data or if you have many agents re-sampling each other it can be useful to have a quick way to turn agents off/on other than by opening their Rename dialog and using the pop-up menu.

Anyway, for the latter occasion, here's a simple conditional stamp you can make which will toggle an agent between 'Normal' (the default) and 'Off'.Once created use as you would any other stamp - select the note in a major view and apply the stamp from the Stamps menu

Name:   Toggle agent on/off
Action:   if($AgentPriority==1){$AgentPriority=-1;}else{$AgentPriority=1;}

Note, because the 'off' value is '-1' we can't use a short-form test like if($AgentPriority){ as '-1' coerces to true. Only '0' coerces to false and a '0' value equates to 'Highest'.

More on $AgentPriority.



Title: Re: Agent on/off toggle stamp
Post by Sumner Gerard on Oct 12th, 2012, 12:43pm

Always wary of agents mysteriously running in the background–never know when they will go rogue on me–I find this tip very useful. Thanks!

One could have the stamp show/hide a badge or otherwise control the agent's appearance to give a visual cue as to whether it is on or off.  

And like all stamps (I've realized of late) it's just like any other menu item in that it can be assigned a keyboard shortcut.

Title: Re: Agent on/off toggle stamp
Post by Mark Anderson on Oct 12th, 2012, 12:48pm

$Badge? Yes, or often I toggle $Color (bright red off, green on) though the latter is probably unkind on the eyes for map based users.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.