Re: Appleworks 5: Make new object at ???
Re: Appleworks 5: Make new object at ???
- Subject: Re: Appleworks 5: Make new object at ???
- From: T&B <email@hidden>
- Date: Tue, 20 Nov 2001 10:43:55 +1100
Should be so simple.
It is, once you know how :-)
tell application "AppleWorks"
make new document at [WHAT GOES HERE?] with properties {document kind:WP}
end tell
I've tried 'at end', 'at 1', 'at beginning', at '{0,0}', 'at it' and am running out of options.
In general, "at front", "at end" etc will work. In AppleWorks 5, as I recall, there's a particular bug where only "at front" (or "at beginning") will work. "at end" just acts like "at front".
So, this should work fine:
tell application "AppleWorks"
make new document at front with properties {document kind:WP}
end tell
Furthermore, since WP is the default value for the document kind property in this make command, it is optional, so all you need is:
tell application "AppleWorks"
make new document at front
end tell
I'm often puzzled by the 'at' parameter of the otherwise fairly standard 'make' command. Anyone got a heuristic for getting valid location references for a given app?
This exact command is described in detail in lesson 10 of this tutorial:
http://www.tandb.com.au/applescript/tutorial/
Tom
T&B