[OS X TeX] Applescript in TS

Themis Matsoukas tmatsoukas at me.com
Mon Nov 7 12:44:41 EST 2011


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




More information about the MacOSX-TeX mailing list