Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Close Other Documents in Window
try
tell application "BBEdit"
set mywindow to window 1
set mydoc to (URL of document 1 of mywindow) as POSIX file
set alldocs to documents of mywindow
repeat with doc in alldocs
if ((((URL of doc) as POSIX file) as string) is equal to (mydoc as string)) then
-- active doc
else
close doc
end if
end repeat
end tell
on error
beep
end try
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.