I was looking for a way to batch print a directory of over 900 tiff files for work, and figured a basic AppleScript (very basic, as I don't know AppleScript) would do it. However, I couldnt' get it to work as you can't close window 1 or document 1 or whatever in Preview via AppleScript. So at best, my script would load all the documents, but not print more than one.
I looked around on the web quite a bit and finally found this tidbit that worked for me. Open the Preview.app package (control-click on it and choose Show Package Contents from the pop-up menu), then edit the info.plist file by adding a new boolean key set to Yes:
NSAppleScriptEnabled -- Boolean -- Yes
Save the changes, then quit and restart both Preview and Script Editor, you can now have AppleScript go through a directory of tiffs (or presumably any documents that open in Preview), open and print them, and close them one by one with a basic AppleScript. My previous solution was to use GraphicConverter to batch convert the documents to a giant multipage tiff, and then print it using GraphicConverter, which is just not particularly quick. This solution is much better.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20060924103117276