• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Print in TextEdit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Print in TextEdit (From: "Mark Watkins" <email@hidden>)

  • Prev by Date: Re: Misc Eudora questions
  • Next by Date: Re: Was: "+" and "-" are numbers. IS: URL parsing
  • Previous by thread: Print in TextEdit
  • Next by thread: Re: Print in TextEdit
  • Index(es):
    • Date
    • Thread