[OS X TeX] Applescript in TS
Claus Gerhardt
claus.gerhardt at uni-heidelberg.de
Mon Nov 7 19:32:51 CET 2011
-- Applescript direct
tell application "TeXShop"
activate
get path of document of window 1
set fileName to result
end tell
do shell script "open -a " & "/Applications/Excalibur/Excalibur.app " & quoted form of fileName
On Nov 7, 2011, at 18:44, Themis Matsoukas wrote:
> Claus,
>
> The script does not recognize blanks in the file name. I gives the applescript error:
>
> "The files /Users/themis/WorkStuff/Classes/ChE, /220/Homework/_hw-collection, and /[2011]/problem-dbase/ch7_mix_steam_1/problem.tex do not exist."
>
> The script has broken the file name into three strings by cutting where the blanks are. The correct file name, as read by dropping the file on the terminal, is
>
> /Users/themis/WorkStuff/Classes/ChE\ 220/Homework/_hw-collection\ \[2011\]/problem-dbase/ch7_mix_steam_1/problem.tex
>
> Is there easy easy fix for that?
>
> Themis
>
>
> On Nov 7, 2011, at 11:48 AM, Claus Gerhardt wrote:
>
>> Use
>>
>> -- Applescript direct
>>
>> tell application "TeXShop"
>> activate
>> get path of document of window 1
>> set fileName to result
>> end tell
>> do shell script "open -a " & "/Applications/Excalibur/Excalibur.app " & fileName
>>
>> and correct the path to Excalibur if necessary.
>>
>> Claus
>>
>>
>
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
>
More information about the macostex-archives
mailing list