Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Agent on/off toggle stamp (Read 2943 times)
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Agent on/off toggle stamp
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.


Back to top
 
« Last Edit: Oct 11th, 2012, 7:02am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Sumner Gerard
Full Member
*
Offline



Posts: 359

Re: Agent on/off toggle stamp
Reply #1 - 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.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Agent on/off toggle stamp
Reply #2 - 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.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print