[OS X TeX] Applescript in TS

Claus Gerhardt claus.gerhardt at uni-heidelberg.de
Mon Nov 7 17:48:15 CET 2011


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


On Nov 7, 2011, at 17:20, Themis Matsoukas wrote:

> I have been using the following script to call excalibur from TS:
> 
> --AppleScript
> 
> tell application "Excalibur"
> 	activate
> 	open POSIX file #FILEPATH#
>       activate
> 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?
> 
> Thanks
> 
> ----------- 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