[PD-dev] Tcl exec vs. Microsoft filenames

Martin Peach martinrp at vax2.concordia.ca
Thu Jan 19 19:29:51 CET 2006


Hans-Christoph Steiner wrote:

>
>
> I think its more of a Tcl question.  The problem is that if I run 
> this  from the command line, it works fine:
>
> rundll32 url.dll,FileProtocolHandler file:C:/Program  
> Files/pd/doc/manuals/Gem/cMatrix.html
>
> But if I do this in Tcl, it does not:
>
> set filename "C:/Program Files/pd/doc/manuals/Gem/cMatrix.html"
> exec rundll32 url.dll,FileProtocolHandler [format "file:%s" $filename] &
>
> Quotes don't seem to make it work either.
>

I tried the following simple script on WinXP and it works fine here (Tcl 
for Windows Tcl 8.4.11, Tk 8.4.11) using File->Source... from the 
Console that shows up when you type "wish" on a command line:

#!/usr/bin/wish

puts "Hello"
set filename "C:/Program Files/pd/doc/gem/manual/index.html"
exec rundll32 url.dll,FileProtocolHandler [format "file:%s" $filename] &

... then my browser opens the URL 
"file:///C:/Program%20Files/pd/doc/gem/manual/index.html".
It also works if I just enter the name of the script in a command prompt 
window.
Perhaps the version of tcl is important?

Martin




More information about the Pd-dev mailing list