Printing to PDF via GUI scripting.
Printing to PDF via GUI scripting.
- Subject: Printing to PDF via GUI scripting.
- From: "Schaaf, Bob" <email@hidden>
- Date: Tue, 4 Feb 2003 11:07:21 -0500
I'm looping through a folder of text files which must be opened in BBEdit,
reformatted, printed to PDF, and closed.
Having used System Events to do Page Setup and Print, with Default Folder X
to set the destination folder, I've run into a real problem between
dismissing the Save dialog and closing the file.
Printing is asynchronous! After the Save button is clicked, the script
continues and tries to close the file, which is still in use (i.e. PDF
conversion). The whole script hangs.
I would be possible to put in a "delay" statment, and this works, but is
inelegant. Further, these print files are of variable size, and it would be
difficult to determine the delay time. I don't want to us an arbitrary
large number. (GUI scripting can be painfully slow. Tried selecting a menu
item from a pop up button?)
Is these any way to determine when the printing process terminates, and
resume execution only then?
Thanks,
Bob Schaaf,
AIG Technical Services
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.