Re: Print in TextEdit
Re: Print in TextEdit
- Subject: Re: Print in TextEdit
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 05 Aug 2002 09:36:45 -0700
On 8/5/02 8:42 AM, "Mark Watkins" <email@hidden> wrote:
>
All I want to do is print without having to save to a file.this is what I'm
>
doing.
>
>
tell application "TextEdit"
>
activate
>
set the text of the front document to "here is some text"
>
print document 1
>
end tell
>
>
it won't print like this. Any ideas? Also, I've tried doing:
>
print "some:file:path.txt"
>
>
and no dice. Tell me what I'm doing wrong.
Although I don't trust TextEdit's dictionary further than I can throw it,
this is what it has for 'print':
print: Print an object.
print [list of alias] -- list of objects
That makes it pretty clear you can only print lists of files, not open
documents. It will actually print a single doc too (whether originally open
or not), but only after flashing up a Print dialog. That's not unusual on
the Mac, unfortunately. Many apps are the same way (about the print dialog,
that is, NOT about being unable to print open documents instead of files).
So
tell application "TextEdit"
activate
print "some:file:path.txt"
end tell
is all I can get it to do here, but it does work, after i press the OK
button on the Print dialog.
--
Paul Berkowitz
_______________________________________________
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.