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 >> how to open an URL using "onvisit" - act
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1471120432

Message started by andreas grimm on Aug 13th, 2016, 4:33pm

Title: how to open an URL using "onvisit" - act
Post by andreas grimm on Aug 13th, 2016, 4:33pm

I.

In either Tinderbox or Storyspace I'd like to create a trigger that opens an URL that is attached to the note as soon as the note is visited.  

I thought of using the onvisit-attribute but don't know the needed language in order to trigger the URL as soon as I visit the note.

II.

Hence, if the URL refers to a note located in Devonthink, how would one has to adjust the query in order to only being redirected to the note in Devonthink but also having the note being opened in Tinderbox/Storyspace.

III.

Is it possible to make the hover-label clickable for it is, of course, possible to show the URL as hover-label.

Indeas?
Cheers!

Title: Re: how to open an URL using "onvisit" - act
Post by Mark Anderson on Aug 13th, 2016, 9:23pm

I don't believe there is an action for opening external URLS. So  I and II are not currently possible.

Item III is not currently possible so I suggest you email a feature request to Eastgate.

~~~~~
The above is true. Using AppleScript and the UI you might be able to simulate pushing the globe icon on a URL-type KA but that does seem an ugly hack.

Title: Re: how to open an URL using "onvisit" - act
Post by andreas grimm on Aug 17th, 2016, 12:30pm

Thanks Mark A. for getting back on this.

Actually, Maybe there is something that at least in Storyspace seems to work quite alright.

It's more or less directly taken from Howard Oakley's site:

https://eclecticlight.co/2015/12/30/storyspace-3-digging-a-bit-deeper-with-attributes-prototypes-and-actions/

There, Howard suggests to work with "runCommand" command.

I simply extracted the part I needed - which runs:
Code:
runCommand("open -b com.apple.Safari http://www.eastgate.com")


So add the "onVisit" attribute to any note you like in Storyspace. And the next time you click on that respective mode you'll be taken to eastgate.com

(This actually works no matter whether your in Read- or Edit-Mode).

Thanks again to Howard Oakley.

Cheers!

Title: Re: how to open an URL using "onvisit" - act
Post by Mark Anderson on Aug 17th, 2016, 1:44pm

Tinderbox supports the same shell access (runCommand) as Storyspace. In fact, Storyspace v3 inherits that new functionality from its use of Tinderbox's frameworks.

So yes, that method could be used as a kludge. MB will be able to gave an authoritative view

[edit]I was quite happy to be wrong - and I was. Thus this edit![/edit]

Title: Re: how to open an URL using "onvisit" - act
Post by Mark Bernstein on Aug 17th, 2016, 3:28pm

This is harmless and rather clever. It can be even simpler:

   runCommand("open http://www.eastgate.com/")

Should work fine, too. You could also use the open command to open specific files in Preview, or to play songs in iTunes, or to turn on your garage lights.  That's not quite what I had in mind for onVisit() actions, but I don't foresee great problems.

Title: Re: how to open an URL using "onvisit" - act
Post by Sumner Gerard on Aug 18th, 2016, 12:41pm

Is this Storyspace only? I see the OnVisit attribute in Tinderbox but "can't get it to do anything."

Title: Re: how to open an URL using "onvisit" - act
Post by Mark Bernstein on Aug 18th, 2016, 1:02pm

It's currently just Storyspace; I hadn't anticipated this application in Tinderbox.

Title: Re: how to open an URL using "onvisit" - act
Post by andreas grimm on Aug 21st, 2016, 7:29pm

Thanks for all the valuable feedback.

Increasingly using Tinderbox to replace Keynote.app for presentations, it's more than just a matter of convenience having Tinderbox doing/taking/triggering some action upon visiting a note which, for instance, immediately opens a linked image in Preview.app ... At least MB doesn't seem to foresee great problems in doing so.

Maybe in a not too distant future we'll have a clickable HoverExpression that allows for triggering actions (like opening linked images in Preview.app) -- with the benefit of a semi-immediate action-trigger-option. Then, one could click on a URL (shown as a note-Hover) to be opened in Safari one without the need for reaching for the Text Pane Selecter.

What do you think?


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.