Launching a local file in the default browser

FlexibleLearning at aol.com FlexibleLearning at aol.com
Mon Aug 18 15:38:00 EDT 2003


The Original:

     <send "file:///" &tPath to program "Finder" with "GURLGURL">

Ken wrote:

> I tried it without the "file:///" in OS X as well as with other
> variations with less than three slashes. All did nothing. Perhaps it's
> the fact they are "/"-delimited paths that they require "file:///" ? 


As Brian points out, the third / is the first character of the Mac path...

     send "file://" & "/Alice/Desktop Folder/myGif.gif" to program "Finder" 
with "GURLGURL"

should happily attempt to open the file in the default Browser. This is fine, 
so long as the Browser can display the filePath like images and simple text. 
But... What's the syntax to open ANY file with it's native application when 
you don't know the filetype-creator? It must be possible as the Finder does it 
when you double-click an icon on the desktop. I'm sure that sending the 
appropriate AppleScript to Finder would do the trick, as in...

     put "send open file"&&tURL&& "to Finder" into tScript
     do tScript as AppleScript
     put the result

(okay, this puts "compiler error", but that's because I don't know 
AppleScript!)

I suspect there will be syntax differences between MacOS and OSX (perhaps 
"file" vs "location")

Any offerings? Still much needed here! 

/H
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.runrev.com/pipermail/metacard/attachments/20030818/8d22f527/attachment.htm


More information about the metacard mailing list