Re: Appleworks 5: Make new object at ???
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