[OS X TeX] Re: Alpha, DoScript and non unix like paths

Joachim Kock jkock at start.no
Thu Jan 6 07:22:56 EST 2005


> the Applescript
> 
> tell application "AlphaX"
> 	set theAnswer to DoScript "win::getInfo " & fileName & " " & "dirty"
> end tell
> 
> will retrieve the information, if a document has been modified, where
> fileName has to be the full unix path to the file which may not contain
> spaces. If the path contains spaces, then it would be natural to use
> the quoted form of fileName, e.g., a shell script would immediately
> accept this, but DoScript will report an error or run forever in this
> case.
> 
> Is there a possiblity to handle non unix like paths?

I don't know what you mean by 'the quoted form of fileName', if this is 
some AppleScript standard conversion, but in any case what Tcl wants is simply 
double quotes around the string that is to be interpreted as a single token.
Hence you just have to insert double quotes around the fileName argument,
like this:

tell application "AlphaX"
   set theAnswer to DoScript "win::getInfo " & "\"" & fileName & "\"" & " " & "dirty"
end tell

This is not particularly elegant, but perhaps with AppleScript's " and &
syntax there is no better solution?

Cheers,
Joachim.


------------------------------------------------------------
Få din egen @start.no-adresse gratis på http://www.start.no/
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list