A few questions on multi-platform MetaCarding
Scott Rossi
scott at tactilemedia.com
Thu Aug 22 05:03:03 EDT 2002
>> on launchBrowser theURL
>> case "MacOS"
>> put "open location "& quote & \
>> theURL & quote into thecode
>> do thecode as applescript
>> end launchBrowser
> Interestingly, that handler fails under OS X when specifying a local URL: it
> launches the program which created the file rather than the default browser.
Maybe failure isn't exactly the right word for this. It makes sense to be
able to open a file with its native app, but granted something like "open
file" would certainly make more sense in this case.
> I have not yet found the reliable method for launch the default browser with
> a local URL under OS X.
Can you grab the default browser name? If yes, the following seems to work
here using Communicator on OSX (don't know how reliable it is):
# tURLpath is the path of the local file
delete char 1 of tURLpath
replace "/" with ":" in tURLpath
put \
"tell application" && quote & "Finder" & quote & cr & \
"open file" && quote & tURLpath & quote && \
"using application file id" && quote & "MOSS" & quote & cr & \
"end tell" into s
do s as applescript
My knowledge of AppleScript is very limited; there may be a more flexible
way to do what you want.
Regards,
More information about the metacard
mailing list