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 >> path names for functions like inside()
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1443719659

Message started by Anand on Oct 1st, 2015, 1:14pm

Title: path names for functions like inside()
Post by Anand on Oct 1st, 2015, 1:14pm

I am interested in using inside() in a query or a rule. I have two questions about the argument provided to inside():

1) If the argument contains spaces or other mischievous characters, do I use quotation marks to specify the path? For example, inside("/folder/subfolder/adornment name with blanks")?

2) If I leave out the full path, will inside() look in the current path? For example, can I use inside("adornment name with blanks") for notes that are already in /folder/subfolder?

Thanks.

Title: Re: path names for functions like inside()
Post by Mark Anderson on Oct 1st, 2015, 1:31pm

inside() can only be used in a query, i..e in an agent or smart adornment. But an edge case is find(query) - which also uses query functions. find() is optionally used with many action codes that need to define an item or group scope. Must usually the latter is done using a designator, but find() can be useful if a particular scope is needed and which not designator can fulfil.

1. In short Yes, this is a good defensive measure. It may work without the quotes depending what the 'mischievous' characters are.  Of course, if in doubt, better to err on the side of safety.

2. In short, probably not. If only specifying a $Name rather than a full $Path and where a single match is expected, a general rubric is that TB will use the first matched object going by outline.

Unfortunately 'adornment' only works in a query context, thus ont in a rule.  This means a note can't ask: "am I on an adornment?" or "what is the name/path of the adornment upon which I am located?".

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.