[OS X TeX] Applescript problem

Herbert Schulz herbs at wideopenwest.com
Sun Dec 11 10:10:11 EST 2011


On Dec 11, 2011, at 8:01 AM, Eric van der Oord wrote:

> Hi all
> 
> I'm using LIon + TeXShop 3.06.
> 
> The following script worked with OSX Snow Leopard and TeXShop 2.xx :
> 
> %%%%%%%%
> 
> --applescript
> tell application "System Events"
> 	tell process "TeXShop"
> 		click menu item "Copier" of menu 1 of menu bar item "Édition" of menu bar 1
> 	end tell
> end tell
> 
> do shell script " pbpaste > texfmr ;   sed -i 1 -f ~/Library/conversion/mac-tex.txt texfmr ; pbcopy < texfmr ; rm texfmr ; rm texfmr1"
> 
> tell application "System Events"
> 	tell process "TeXShop"
> 		click menu item "Coller" of menu 1 of menu bar item "Édition" of menu bar 1
> 	end tell
> end tell
> 
> %%%%%%%%%
> 
> Now the script aborts at the first line. The error message is as follows :
> 
> <Capture d’écran 2011-12-11 à 14.44.35.pdf>
> 
> Has AppleScript changed his syntax once more ? Any hint ?
> 
> Eric

Howdy,

I don't know what is happening in your case but it certainly wouldn't surprise me if the syntax has changed once again. A macro that I have been using for years stopped working under Lion. The only way I could get it to work without generating an error was to comment out the `on error' clause. There weren't any errors so I don't know why that happened.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the MacOSX-TeX mailing list