[OS X TeX] Applescript in TS
claus.gerhardt at uni-heidelberg.de
Mon Nov 7 17:48:15 CET 2011
-- Applescript direct
tell application "TeXShop"
get path of document of window 1
set fileName to result
do shell script "open -a " & "/Applications/Excalibur/Excalibur.app " & fileName
and correct the path to Excalibur if necessary.
On Nov 7, 2011, at 17:20, Themis Matsoukas wrote:
> I have been using the following script to call excalibur from TS:
> tell application "Excalibur"
> open POSIX file #FILEPATH#
> end tell
> tell application "TeXShop"
> close window 1
> end tell
> With the source file active, the script used to pass the file to Excalibur and then close the TS file (to avoid double-editing). Recently, however, the script stopped passing the source file to Excalibur. Excalibur does launch, but it has no file to process.
> If I change --AppleScript to --AppleScript direct, the source file is passed, TS closes the latex source window, but then TS says "TeXShop got an error: AppleEvent timed out."
> Can someone suggest a solution?
> ----------- 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