my BBEdit dictionary tells me the save statement has this options:
save: Save a window’s contents in text format. (from Standard Suite)
save reference -- window to save
[to alias] -- file in which to save the window’s contents
[saving as stationery boolean] -- save the file as stationery? (By Default, false.)
[add to recent list boolean] -- add to the application's recent file list? (By Default, true.)
[add to favorites list boolean] -- add to the application's favorite file list? (By Default, true.)
The window class has the following properties:
Class window: an open window
Plural form:
windows
Elements:
text by numeric index
Super classes:
item
Sub classes:
about_window, differences window, disk browser window, FTP browser window, group window, palette, movie window, preferences_window, picture window, QuickTime window, results browser, text window
Properties:
properties record -- (inherited from the “item” class) all of this object’s properties
ID integer [r/o] -- (inherited from the “item” class) object’s unique id
container reference [r/o] -- (inherited from the “item” class) object’s container (if any)
bounds bounding rectangle -- the boundary rectangle for the window
closeable boolean [r/o] -- Does the window have a close box?
index integer -- the number of the window
modal boolean [r/o] -- Is the window modal?
file alias [r/o] -- the disk file associated with this window, if any
modified boolean [r/o] -- Has the window been modified since the last save?
name international text -- the title of the window
position point -- upper left coordinates of the window
resizable boolean [r/o] -- Is the window resizable?
selection reference -- the selection
contents anything -- contents of the window (if any)
text text -- the window's text object (if any)
titled boolean [r/o] -- Does the window have a title bar?
visible boolean [r/o] -- Is the window visible?
zoomable boolean [r/o] -- Is the window zoomable?
zoomed boolean -- Is the window zoomed?
You should give your first window a name first:
set name of window 1 to "aName"
Then you can reference the window any time by its name: