Is there a way to close documents in projects? I am updating a script for 
BBEdit 10 that worked fine in BBEdit 9. In BBE10 no kind of "close" script 
command seems to close the document; they all stay open and in the 
"Currently Open Documents" list. Having all your documents in an open state 
in BBEdit might be all right most of the time, but I'm using this script to 
batch process over five thousand HTML files, and I need the script to close 
each file once it's been processed.

Apologies if this has posted twice (having Google Groups issues), or if 
there is already an answer in this group somewhere (I did search for an 
answer, I promise).

set theProj to project document 1
repeat with n from 1 to (count items of theProj)
set currentFile to file of item n of theProj
open currentFile
set currentWin to text document (name of item n of theProj)
-- do stuff
save currentFile
close currentFile
end repeat

-- 
-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>



Reply via email to