-------------------------------------------------------------------------------------------
set savePath to path to desktop as text
set docName to "My Test Document"
set _text to "Now is the time for all good men to come to the aid of their country."
tell application "BBEdit"
activate
set newDoc to make new document with properties {name:docName, text:_text}
save newDoc to (savePath & docName)
end tell
# OR
tell application "BBEdit"
activate
set newDoc to make new document with properties {text:_text}
save front text document to (savePath & docName)
end tell
# If the document is has previously been saved to disk:
tell application "BBEdit"
activate
tell front document
save
close
end tell
end tell
-------------------------------------------------------------------------------------------