[PD-dev] Tcl exec vs. Microsoft filenames

Hans-Christoph Steiner hans at eds.org
Thu Jan 19 23:01:22 CET 2006


On Jan 19, 2006, at 1:29 PM, Martin Peach wrote:

> 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?

Pd-extended on Win32 uses Tcl/Tk 8.4.11 too.

Perhaps you could try editing c:\Program Files\pd\bin\pd.tk and see if  
you can get it working?

.hc

________________________________________________________________________ 
____

"Terrorism is not an enemy.  It cannot be defeated.  It's a tactic.   
It's about as sensible to say we declare war on night attacks and  
expect we're going to win that war.  We're not going to win the war on  
terrorism."
                                     - retired U.S. Army general,  
William Odom





More information about the Pd-dev mailing list