[OS X TeX] [TeXShop] console window should close automatically

Tobias Sebastian Kuhn tosebk at gmail.com
Tue Apr 3 08:54:05 EDT 2007


Am 03.04.2007 um 12:47 schrieb Friedrich Vosberg:

>   osascript -e "tell application \"TeXShop\" to close window 3"
>
> does nothing.
Hmmmh, no idea why.
> An single AppleScript containing
>
>   tell application "TeXShop" to close window 3
>
> closes *all* windows (tex, pdf, console) of the current file.

Well, the integer is the "index (integer) : The index of the window,  
ordered front to back." (from the dictionary of TeXshop).
Sorry, I didn't checked. As after a normal teXing the console window  
is normally the second window, it should be 2, not 3. It's better to  
use instead the name of the window title. On the command line it IS  
working using the window title or the right index number/integer.

Maybe with
osascript /path/to/close.scpt `basename`
in the engine
and
on run argv
tell application "TeXShop" to close window (item 1 of argv as string  
& " window")
end run
in /path/to/close.scpt.
(See the example in the Man page of osascript)

But there's another possiblity:
You want to print, and the typeset is done without any error, so why  
not check TeXShop>Preferences>Typesetting>Show Console>when error occurs
Then the console window never shows up.

Regards
T.

------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list