Hugh,
That works for internet addresses and local files that don't have a type
and creator code associated with them. If you *do* have a type/creator
code, you need to strip it before you can launch it.
But you're right... "send to ..." is a lot easier than crafting an
AppleScript for that purpose. So here's my previous solution with "sent
to" used instead, along with a method to just strip the original file's
type/creator code and effectively "leave it in place" and a little error
checking:
on launchit pPath
StripTC pPath
send "file:///" & pPath to program "Finder" with "GURLGURL"
end launchIt
on StripTC pPath
put pPath into tDestPath
set the itemDel to "/"
put last item of pPath into tOrigName
put "temp.html" into last item of tDestPath
get shell("cp" && pPath && tDestPath)
if it <> "" then
answer "Error:" & it
exit to top
end if
put tOrigName into last item of pPath
get shell("mv" && tDestPath && pPath)
if it <> "" then
answer "Error:" & it
exit to top
end if
end StripTC
Have fun!
Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Saturday, August 09, 2003 7:41 AM
To: [EMAIL PROTECTED]
Subject: Re: Launching a local file
I though this was simply
send tAddress to program "Finder" with "GURLGURL"
where tAddress resolves to either a local or internet url. Or did I miss
the original point once again? :)
/H
_______________________________________________
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard