On Jan 5, 2004, at 1:55 PM, Richard Gaskin wrote:


 but I have not yet
come up with a robust solution for launching a local file in the user's
default browser in Panther. :(

How about: get shell("open /path/to/file.html")

I've found the open command to be completely robust using from the unix shell. SHould be just as good from shell(). man open:

SYNOPSIS
     open [-a application] file ...

open [-e] file ...

DESCRIPTION
The open command opens a file (or a directory or URL), just as if you had
double-clicked the file's icon. If no application name is specified, the
default application as determined via LaunchServices is used to open the
specified files.


If the file is in the form of a URL, the file will be opened as a URL.

You can specify one or more file names (or pathnames), which are inter-
preted relative to the shell or Terminal window's current working direc-
tory. For example, the following command would open all Word files in the
current working directory:


open *.doc

The options are as follows:

     -a application
              specifies the application to use for opening the file

-e causes the file to be opened with /Applications/TextEdit

EXAMPLES
'open /Volumes/Macintosh HD/foo.txt' opens the document in the default
application for its type (as determined by LaunchServices).


'open /Volumes/Macintosh HD/Applications/' opens that directory in the
Finder.


'open -a /Applications/TextEdit.app /Volumes/Macintosh HD/foo.txt' opens
the document in the application specified (in this case, TextEdit).


'open -e /Volumes/Macintosh HD/foo.txt' opens the document in TextEdit.

'open http://www.apple.com/' opens the URL in the right browser.

'open file://localhost/Volumes/Macintosh HD/foo.txt' opens the document
in the default application for its type (as determined by LaunchSer-
vices).


'open file://localhost/Volumes/Macintosh HD/Applications/' opens that
directory in the Finder.


HISTORY
     First appeared in NextStep.



Alex Rice <[EMAIL PROTECTED]> | Mindlube Software | <http://mindlube.com>

what a waste of thumbs that are opposable
to make machines that are disposable  -Ani DiFranco

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to