Hook with Tinderbox 8

#1

I’m trying to get Hook to work with Tinderbox. Version 8 supports appleScript. With that I was able get the name:

tell application "Tinderbox 8"
	tell front document's selection
		set theNames to name
	end tell
end tell

and the address of a note:

tell application "Tinderbox 8"
	tell front document's selection
		set noteURLs to value of attribute "NoteURL"
	end tell
end tell

To open an item I’m using this script:

set note_id to "$0"
                tell application "Tinderbox"
                activate
                open location note_url
                end tell

That script selects the correct note, but the text window isn’t in sync with with the selected note. I asked for help on the Tinderbox forum, but maybe someone here knows if there is something wrong in the scripts? I’m a beginner with appleScript and tried to put things together based on examples I found.

1 Like
#2

Do you need to set the ?select, ?view or ?pane attributes? From this link it looks like you’re just getting the document URL.

http://www.acrobatfaq.com/atbref7/index/ObjectsConcepts/Concepts/TinderboxURLschema.html

#3

Thanks for the pointer to the website. I think the proper attributes are set. Here is an example of a full link I’m getting when I invoke Hook on a note:

tinderbox://myWiki2/Academic Disciplines/Social Sciences/Psychology?view=outline+select=1555427616;

#4

That should be ?select not +select shouldn’t it? Is that the problem?

#5

Tried to make that change:

tinderbox://myWiki2/Academic Disciplines/Social Sciences/Psychology?view=outline?select=1555427616;

but that opens a new tab (with the view that was currently active, which might not be the outline view I’m requesting).

I did one more test: I selected in tinderbox from the note’s menu (instead of using my appleScript in Hook) to get the url. This produces this link:

tinderbox://myWiki2/?view=outline+select=1555427616;

which leaves out the path compared to what I had. However, same difference, the note gets selected but the text shown in the editor belongs to whatever note was selected previously. I think I’m going to ask the Tinderbox guys.

#6

It’s a bug in the way Tinderbox 8 interacts with scripts. Scripting was added to Tinderbox about a week before v8 was released, and is not fully fleshed out. I suggest you skip the forums and write Mark Bernstein (bernstein at Eastgate dot com) directly with your questions and suggestions – he is open for exposing more commands in the Tinderbox dictionary for people who want to script.