>Matt Henderson writes 23 June 1999 > >>Do any of you know of a way to print an entire project of source BBEdit files >>automatically-- i.e. I'd like to point *something* (Perl script, AppleScript, >>BBEdit function, ...) to a project directory, and have all text files >>(even in >>subdirectories) printed automatically, without bringing up the print dialog >>box. > >I believe an AppleScript along the lines: > tell application "Finder" > print contents of folder "full:path:to:folder" > end tell >will do just what you want without any dialogs coming up. > >To go recursively through all the sub-folders in the folder, you can either >do this in AppleScript printing files as you go, or, fish out the >sub-folders with Perl and send each one in turn to AppleScript for >printing. Unfortuantely, asking the Finder to print something is exactly akin to manually selecting the item in the Finder and choosing "Print" from the File Menu. It launches the application that created the document, and tells the application to print it. (I.e. sends the print AppleEvent to the application in question). This brings up whatever print dialog box the application ususally brings up. So, in the case of documents of the same application - ideally it will only bring up *one* print dialog (if the application is written really poorly, however, it could bring up one for each document). In the case of documents made by different applications (like, say, a collection of source code files some of which are BBedit files and some of which are CW IDE files), it will launch both applications, and bring up two separate print dialog boxes in a very un-automation-friendly way. AFAIK the only way to print without bringing up a print dialog box is either to talk to the printer yourself, or use the Desktop Printer Manager (and I'm not sure that avoids the dialog box, either). -Jeff Lowrey P.S. is there a better list for this discussion - since we both think it's OT for the macperl list? ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org