Re: Standard file open/app launch commands for Mac, Win, and X11
- From: Benjamin Riefenstahl <b.riefenstahl@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 29 Apr 2006 18:39:04 +0200
Hi Kevin,
Kevin Walzer writes:
Windows: eval exec [auto_exe*** start] myphoto.jpg; [...]
That should be
eval exec [auto_exe*** start] [list "" "my photo.jpg"]
a) You need a "" for the "title" argument to START (check out
START/?). Otherwise, when the first argument is quoted, START will
treat that as a title. And the filename will be quoted when it
contains spaces. This is on NT/W2K, I don't know about W9x/Me.
b) You need [list] to offset the [eval] when your you do a) and/or
when your filename contains spaces.
eval exec [auto_exe*** start] http://wiki.tcl.tk
See also <http://wiki.tcl.tk/557>.
The easiest on Windows is probably to write or re-use a binary
extension that wraps the ShellExecute API, like the one on
e.g. <http://wiki.tcl.tk/13925>.
Linux/Unix (Gnome): exec gnome-open myphoto.jpg; exec gnome-open
http://wiki.tcl.tk
Linux/Unix (KDE): exec "kfmclient exec myphoto.jpg"; exec "kfmclient
exec http://wiki.tcl.tk"
Linux/Unix (other): tk_getOpenFile ("Please choose the program to open
this file":)
You might want to look at what the Portland project plans with their
"xdg-utils" <http://portland.freedesktop.org>. They cover the same
ground here.
benny
.
- References:
- Standard file open/app launch commands for Mac, Win, and X11
- From: Kevin Walzer
- Standard file open/app launch commands for Mac, Win, and X11
- Prev by Date: help image scrolling
- Next by Date: Re: How to interpet Tcl/Tk stack information.
- Previous by thread: Standard file open/app launch commands for Mac, Win, and X11
- Next by thread: help image scrolling
- Index(es):