Last active
November 24, 2017 21:34
-
-
Save davidfmiller/bb90c3b0f9c0808943a662877a7f275d to your computer and use it in GitHub Desktop.
Copy text document paths in the active BBEdit window to clipboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Copy paths of all open text documents in the active BBEdit window to your clipboard | |
*) | |
tell application "BBEdit" | |
set mydocs to every text document in window 1 | |
set urls to "" | |
repeat with doc in mydocs | |
set myurl to (URL of doc) | |
if (myurl is not missing value) then | |
set myurl to ((characters 8 thru -1 of myurl) as string) | |
set urls to urls & {myurl} & " | |
" | |
end if | |
end repeat | |
end tell | |
if (urls is equal to "") then | |
beep | |
else | |
set the clipboard to urls | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment