[OS X TeX] applescripts for TeXShop and iTeXMac?

Matthew Hills hills_tex at tina.stanford.edu
Fri Aug 27 16:48:10 EDT 2004


On Aug 27, 2004, at 12:58 PM, Jan Hülsmann wrote:
>>>   set current_app to ....  (figure out which app is launching the 
>>> script)
>
> maybe something like
>
> if frontmost application as text is "TeXShop" then
> ...


I'm currently using:
		try
			tell the current application to set front_app to my name
		on error
			-- not sure why that doesn't work from TeXShop, so set it here:
			set front_app to "TeXShop"
		end try

This seems to work fine.
What I'm trying to figure out now is how to get the scripts to compile 
and run from within one of these applications without opening the other 
application to access its applescript dictionary.

(the alternative is to release two copies of the script, one for 
TeXShop and one for iTeXMac)

Matt

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