[PD-dev] Tcl exec vs. Microsoft filenames

Hans-Christoph Steiner hans at eds.org
Tue Jan 17 20:21:12 CET 2006


Tried that, no luck.  rundll32 url.dll,FileProtocolHandler interprets  
the " as a character and gets confused because it doesn't know how to  
handle "file: URI types.

Yes, its that bad.  FYI: you can test this stuff from the cmd.exe  
shell, and take Tcl and Pd out of the equation.

.hc

On Jan 17, 2006, at 2:10 PM, B. Bogart wrote:

> Too add quotes to your command try this:
>
> format "\"file:%s\"" $file
>
> the string contained in "" contains the excapted quotes \"
>
> I hope that does it.
>
> .b.
>
> Hans-Christoph Steiner wrote:
>>
>> This is win32.  rundll32 url.dll,FileProtocolHandler doesn't like
>> "file:C:/Program%20Files" from my tests.  This is Microsoft we are
>> talking about, they do things their own way, standards be damned.
>>
>> .hc
>>
>> On Jan 17, 2006, at 1:26 PM, B. Bogart wrote:
>>
>>> yuck, URIs don't have spaces, you put one in a web-page you its   
>>> replaced
>>> with %20 in the URI.. I guess you could have to replace spaces with  
>>> %20
>>> and see if that works.
>>>
>>> Try just opening the file in a browser and note the URL it uses to
>>> open it.
>>>
>>> I assume this happens on win32, but its been too long for me to  
>>> know...
>>>
>>> .b.
>>>
>>> Hans-Christoph Steiner wrote:
>>>
>>>>
>>>> In u_main.tk, in the procedure menu_openhtml, this little snippet of
>>>> code does not work when there is a space in the file name (i.e.
>>>> C:/Program Files/pd/doc), but works fine when there are no spaces:
>>>>
>>>>           exec rundll32 url.dll,FileProtocolHandler \
>>>>                 [format "file:%s" $filename] &
>>>>
>>>> This opens HTML, etc from the menu/help browser, so it would be most
>>>> helpful to have it working.  I have tried a number of things to no
>>>> avail.
>>>>
>>>> Any Tcl-meisters want to take a stab?  Matju?
>>>>
>>>> .hc
>>>>
>>>> ____________________________________________________________________ 
>>>> __
>>>> __
>>>> ____
>>>>
>>>>  As we enjoy great advantages from inventions of others, we should  
>>>> be
>>>> glad of an opportunity to serve others by any invention of ours; and
>>>> this we should do freely and generously.
>>>>                                                   - Benjamin  
>>>> Franklin
>>>>
>>>>
>>>> _______________________________________________
>>>> PD-dev mailing list
>>>> PD-dev at iem.at
>>>> http://lists.puredata.info/listinfo/pd-dev
>>>>
>>>>
>>
>> ______________________________________________________________________ 
>> __
>> ____
>>
>> Man has survived hitherto because he was too ignorant to know how to
>> realize his wishes.
>> Now that he can realize them, he must either change them, or perish.
>>                                                         -William  
>> Carlos
>> Williams
>>
>>
>>

________________________________________________________________________ 
____

  As we enjoy great advantages from inventions of others, we should be  
glad of an opportunity to serve others by any invention of ours; and  
this we should do freely and generously.
                                                   - Benjamin Franklin





More information about the Pd-dev mailing list