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

Claus Gerhardt gerhardt at math.uni-heidelberg.de
Thu Jan 6 08:21:03 EST 2005


Joachim,

Thank you for help and for the page in wiki.

The 'quoted form of' is indeed an Applescript standard conversion. In 
case of the DoScript command one should always use the following syntax

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

This will work for any path, regardless if it complies with the unix 
convention or not.

Claus

On Jan 6, 2005, at 13:22, Joachim Kock wrote:

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

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