• 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: Appleworks 5: Make new object at ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Appleworks 5: Make new object at ???


  • Subject: Re: Appleworks 5: Make new object at ???
  • From: Greg Back <email@hidden>
  • Date: Tue, 20 Nov 2001 21:17:37 -0500

on 11/20/01 4:52 PM, T&B at email@hidden wrote:

> So, this should work fine:
>
> tell application "AppleWorks"
> make new document at front with properties {document kind:WP}
> end tell

Sorry to post so late on this thread (trying to catch up with old digests),
but I have found in my (very limited) scripting experience that it is best
to write:

tell application "Appleworks"
set newDoc to make new document at front with properties {document kind:WP}
end tell

IMO, the "set newDoc to..." is the easiest way to create a document that can
be referenced later in the script. You won't have to say (for example):

set end of document "untitled" of application "Appleworks" to whateverText
--or
save document "untitled" of application "Appleworks" in...

You can instead use

set end of newDoc to whateverText
--and
save newDoc in...

....Just some advice from an average scripter.

--
Greg Back
email@hidden


  • Prev by Date: Thanks!!!!!!!!!
  • Next by Date: Re: Stupid Question - how to quit a script
  • Previous by thread: Re: Appleworks 5: Make new object at ???
  • Next by thread: scripting pop-up windows?
  • Index(es):
    • Date
    • Thread