TextEdit: Anyone know how to print the front document without showing the print dialog? Thanks.
The TE dictionary says:
print‚v : Print an object.
print alias : The file(s) or document(s) to be printed.
[print dialog boolean] : Should the application show the Print dialog?
[with properties print settings] : the print settings
so it looks like all ya gotta do is add to the print statement: print dialog false
It should end up looking like this:
tell application "TextEdit" print front document without print dialog end tell
However, I still get the dialog.
So it appears that I’m not the only one. Apparently TextEdit isn’t as scriptable as the dictionary claims.
I got it with this kluge:
tell application "TextEdit" activate print front document end tell delay 1 tell application "System Events" to keystroke (ASCII character 3)