I'm not following your question correctly. With BBEdit 8 you can have more than one document per
window by using the Documents Drawer and Nav bar. If you are editing a document, that document is in the front window.For this example assume the document has been previously saved, you have made changes to it, and it is active.
Code:
Tell application "BBEdit"
set activeDocName to name of front window
save text document activeDocName
end Tell
Applescript provides a scripting machanism for Apple Events. Applescript commands are verbs that apply to Apple's object model and are not object methods. The Save Event is in the Standard Suite which is a part of BBEdit's dictionary. Applescript's classes are object-like but do not follow all OOP criteria.
Here is the
link to Apple's overview of Applescript. Take a look at the Applescript Language Reference
link as well.
HTH
Craig