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
Automatic export of an agent's notes to a txt file (Read 9273 times)
Robert Black
Full Member
*
Offline



Posts: 3

Automatic export of an agent's notes to a txt file
May 26th, 2008, 10:36am
 
Here's what I want to do:

I want an agent to collect notes that match my criteria, and at a set interval, say 30 minutes (or after 5 minutes idle when any change has been made), export those notes using an export template to a text file. Or an HTML export?

I can't figure out how to do this automatically. Manual execution of the 'Export As Text' works as I need, but how would I set this up to happen automatically?

Here's why:

I've build a project and task management app for myself, using Tinderbox's unique feature set. But although I spend most of my time at my computer, there are distinctly times when I'm away from it that I'd like access to the notes collected by one or two agents.

If I could have these automatically exported to a text file using an export template, then it's not much work for me to either serve that up with a web server, or update a draft message in an IMAP account using that text.

The key word here is 'automatically' - that's what I haven't been able to figure out yet.

Thanks
Robert
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Automatic export of an agent's notes to a txt file
Reply #1 - May 26th, 2008, 5:04pm
 
Tinderbox doesn't currently have an easy way to take actions automatically at a set time or interval.  There is the agent update mechanism, but that's like 10sec, not 30min.

What you might do, perhaps, is have an external script force an export every 30 minutes.  But that feels like a kluge.

Emailing Eastgate with a feature request might be the best thing to do.
Back to top
 
 
WWW   IP Logged
Robert Black
Full Member
*
Offline



Posts: 3

Re: Automatic export of an agent's notes to a txt file
Reply #2 - May 26th, 2008, 9:03pm
 
Quote:
There is the agent update mechanism, but that's like 10sec, not 30min.


If that's the case, could an agent be written that checks against a date/timestamp attribute in a note whether thirty minutes has passed, and if true triggers an export action and resets the date/timestamp attribute to now()?

If so, what might that Query and Action look like?

And maybe I'm thick, but I don't see a simple way to script the exporting of an agent's collected notes with an Agent Action. Clicking on an Agent with the mouse manually and selection Export As Text from a menu - yes. As an action - no. Suggestions from all-comers welcome.

Quote:
Emailing Eastgate with a feature request might be the best thing to do


Done. Thanks Mark
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Automatic export of an agent's notes to a txt file
Reply #3 - May 27th, 2008, 4:53am
 
Robert, I believe you ought - in principle - to be able to figure a 30 minute duration using Date attributes and 'now' (or 'today', same thing) plus a 30 minute increment. In my quick tests I've not figured how to indicate 30 minutes as opposed to hours/days/months.

Your export action - if you get that far - would need to be via command line as the internal HTML Export isn't (as far as I'm aware) accessible via an action.
Back to top
 
 

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



Posts: 62

Re: Automatic export of an agent's notes to a txt file
Reply #4 - Jun 30th, 2008, 2:02am
 
Excuse my ignorance, but I'm in a similar situation to Robert.

Is there a way to use Applescript to open a TBX document with the appropriate view already open (from last time I closed it) and export that view to a text file using whatever the currently selected template is?

The rest of Robert's Applescript we could source from the web somewhere. This bit I think would be nowhere else but this forum...
Back to top
 
 
  IP Logged
Robert Black
Full Member
*
Offline



Posts: 3

Re: Automatic export of an agent's notes to a txt file
Reply #5 - Jun 30th, 2008, 3:46am
 
Sadly, in the end it was easier for me to take what I'd done in Tinderbox, and recreate it from scratch in FileMaker 9 Advanced. It now has extra features like window set management that TinderBox never seemed to allow.

I'm not recommending the FileMaker path for anyone else, since I already have a good grasp of FileMaker development - it just illustrates that I couldn't find a neat and simple path to script output from Tinderbox. Similarly, I'm not saying it couldn't be done - just that I gave up trying to find a solution when one didn't present itself with a moderate level of research.

I really like Tinderbox, and continue to use it when brainstorming and rapid-prototyping information structures in the early stages. I just wish I could bring it along for the whole journey in my work. A lack of AppleScript-ability has been a persistent thorn for me. But I understand that Mark has evolved the product in ways that make sense for him and many TinderBox users. Oh well  Smiley
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Automatic export of an agent's notes to a txt file
Reply #6 - Jun 30th, 2008, 6:41am
 
Short answer is maybe. There's certainly no direct AppleScript command to do what you ask. Actually there's no TB command either - you need to open the notes HTML View and click the 'Export' button to export just that page.

Tinderbox isn't really designed to be driven remotely via AppleScript, when compared with something like TextEdit. However, Applescript can be used in limited form with Tinderbox, but the app has no real scripting dictionary beyond the basic suite - i.e. no Tinderbox-specific methods.  Here's how to open a document:
Code:
tell application "Tinderbox"
	-- N.B. Paths must be old-style, with colons and not / delimiters
	open file "Macintosh HD:Users:mwra:Desktop:DT - TB:Set_Export.tbx"
end tell 


Once open you can do limited task but there's no special-to-Tinderbox AS dictionary beyond the standard calls, i.e. no 'export this note to HTML' command.  See the wiki page ScriptingTinderbox for some ideas.

If you know Accessibility UI scripting you may be able to run Tinderbox via AppleScript by walking the menus though I've been unable to get this to work (using Prefab's UI Browser to investigate the UI elements and Script Debugger to call them).
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