Launching a local file in the default browser
Brian Yennie
briany at qldlearning.com
Sat Aug 9 03:37:01 EDT 2003
Still works... I did miss the "local" though and skipped my eyes to the
"browser".
In any case, try this form:
tell application "Finder"
open location "file:///Users/yennie/Desktop/test.html"
end tell
The trick seems to be adding the browser-style protocol to the front
for local files: "file://"
You should have 3 slashes total- the third is part of the file path.
HTH
Brian
> Uh, Brian... he mentioned a "local file" not a web site. Will this
> still
> work?
>
> Ken Ray
> Sons of Thunder Software
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
>
>> -----Original Message-----
>> From: metacard-admin at lists.runrev.com
>> [mailto:metacard-admin at lists.runrev.com] On Behalf Of Brian Yennie
>> Sent: Saturday, August 09, 2003 1:49 AM
>> To: metacard at lists.runrev.com
>> Subject: Re: Launching a local file in the default browser
>>
>>
>> tell application "Finder"
>> open location "http://www.apple.com"
>> end tell
>>
>> ... "do" as AppleScript of course
>>
>>> Yep, the same ol' question: how do I launch a local file in the
>>> default
>>> browser on Mac OS X?
>>>
>>> And for future reference: Where is the definitive answer archived?
>>
>> _______________________________________________
>> metacard mailing list
>> metacard at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/metac> ard
>>
>
>
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
>
>
More information about the metacard
mailing list