Open another application by clicking a note?

Is it possible to click on a note and have it open another application? For example, I have 18 adornments with various climate change topics in them. However, the images I’m going to use in my presentation are in Pixave. I’d like to have an arrow-shaped note on the map, outside of the adornments, that I can click on and have Pixave open. Is that possible? I apologize if this is in the forum somewhere, but I’ve searched unsuccessfully.
Bob

Tinderbox has no ‘on click’ handler so, no clicking on a note can’t result is [some other action]. That said, but untested and in truth not entirely recommended (because it’s a kludge)…

Tinderbox has an OnVisit action, though it is there for Storyspace compatibility. However, the $OnVisit (i.e. on selection) could use runCommand() to open Pixave - if the latter has some form of API. The only Pixave support info I could find is this but it has nothing pertinent; it seems the only out-facing feature is to export pictures. So I think the issue is less in Tinderbox than in getting Pixave to respond to external calls.

Grumble: why are coders of utilities so obtuse as to think all you ever want their utility to do is to import data?

1 Like

To open an app from the command line, use

open -a applicationname

So, to run Acorn (I do not have Pixave):

open - a Acorn

and so

runCommand("open -a Acorn");

A simple approach is to make a Stamp modeled on this example, but opening Pixave. The stamp will reside in Tinderbox’s menu bar, and so you can assign a keyboard shortcut to it. Select the Pixave note or adornment, press the shortcut or run from the Stamps menu, and away you go.

open has many interesting features, which you can explore in Terminal using

man open

3 Likes

I guess one could try the above with any of:

  • the (image) file’s OS name
  • the (image) file’s OS path
  • Pixave’s UID for the record (if this is exposed).

I remain uncertain that hijacking OnVisit as a click event is a good long-term strategy. For instance, how do you access such a note without opening the associated app? Still, it’s not my problem so for now I’m happy to just try and find a solution for the OP. A bit more info about Pixave, given its rather thin (public) documentation, would be a boon.

1 Like

Thanks to all of you for the suggestions and comments! I’ll try some of them out after I get finished with all this dreadful grading, LOL. I really like teaching, but I can’t stand grading.

1 Like

You could also use Tinderbox’s viewInBrowser command, setting $URL to the file URL of the image file.

2 Likes

@ ChemBob - I have an idea for your topic. You are welcome to contact me.

Thanks,
Bernhard
201902091