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
how to open an URL using "onvisit" - act (Read 1626 times)
andreas grimm
Full Member
*
Offline



Posts: 39

how to open an URL using "onvisit" - act
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!
Back to top
 
« Last Edit: Aug 13th, 2016, 4:37pm by andreas grimm »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: how to open an URL using "onvisit" - act
Reply #1 - 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.
Back to top
 
« Last Edit: Aug 17th, 2016, 1:39pm by Mark Anderson »  

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



Posts: 39

Re: how to open an URL using "onvisit" - act
Reply #2 - 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-attri...

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!
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: how to open an URL using "onvisit" - act
Reply #3 - 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

Edited:
I was quite happy to be wrong - and I was. Thus this edit!
Back to top
 
« Last Edit: Aug 17th, 2016, 4:24pm by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: how to open an URL using "onvisit" - act
Reply #4 - 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.
Back to top
 
 
WWW   IP Logged
Sumner Gerard
Full Member
*
Offline



Posts: 359

Re: how to open an URL using "onvisit" - act
Reply #5 - Aug 18th, 2016, 12:41pm
 
Is this Storyspace only? I see the OnVisit attribute in Tinderbox but "can't get it to do anything."
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: how to open an URL using "onvisit" - act
Reply #6 - Aug 18th, 2016, 1:02pm
 
It's currently just Storyspace; I hadn't anticipated this application in Tinderbox.
Back to top
 
 
WWW   IP Logged
andreas grimm
Full Member
*
Offline



Posts: 39

Re: how to open an URL using "onvisit" - act
Reply #7 - 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?

Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print