[APN] I have made a *rough* draft of a new http://www.magicsplat.com/tclwinfaq.html%|%Tcl on Windows FAQ%|%. Eventually I hope it will replace the Tcl Windows FAQ on [http://www.tcl.tk] and sourceforge. It is meant partly as a FAQ and partly to let prospective Tcl'ers that you can do a lot more with Tcl on Windows than indicated in the outdated FAQs. Please comment below on any and all of the following: * questions that should not be in there * questions that should be in there but are not * editorial comments, better clarity etc. * errors of course * anything else There are a few unanswered questions marked by 'TBW'. Answers to these are welcome. ---- [pi31415]: How can I launch a web page with TCL? [APN] Why the {} ? Seems to work with or without it ? Also, it is a LOT slower than executing the same from the DOS command line. Any idea why? ====== [catch {exec {*}[auto_execok start] {} [list $url]}] ====== [DKF]: The first argument to start must either not start with double quotes (as it hits start) or be an empty string. That's because if it is quoted, it's interpreted as the title of the window to create (IIRC; it's a pretty damn crazy thing) rather than as the thing to start. [http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/start.mspx?mfr=true%|%Really] (look at the '''"'''''title'''''"''' bit). Now, the rules for Tcl's handling of arguments in [exec] are very arcane (and only right in the majority of cases) but putting an empty argument as the first argument to start makes most of the craziness go away. ---- '''[dkf] - 2012-04-23 17:12:47''' Everywhere you have `exec [[auto_execok …` it is wrong. :-) That's because [auto_execok] returns a list of words; the recommended way is `exec [{*}][[auto_execok …` The expansion operator is critical! If you're using 8.4 and before, you have to use `[eval] [exec]` and be ''much'' more careful because Windows command lines often (usually?) contain backslashes. '''Wrong''' ====== exec [auto_execok start] "" [file nativename [file normalize foo.bar]] ====== '''Right''' ====== exec {*}[auto_execok start] "" [file nativename [file normalize foo.bar]] ====== '''Wrong (8.4 and before)''' ====== eval exec [auto_execok start] "" [file nativename [file normalize foo.bar]] ====== '''Right (8.4 and before)''' ====== eval exec [auto_execok start] [list "" [file nativename [file normalize foo.bar]]] ====== or ====== eval [linsert [linsert [auto_execok start] 0 exec] end "" [file nativename [file normalize foo.bar]]] ====== I do recommend using 8.5 or later. :-) <> Windows | FAQ