Created
July 12, 2013 09:45
-
-
Save brandonpittman/5983193 to your computer and use it in GitHub Desktop.
Rename_BBEdit_Document
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
tell application "System Events" | |
set new_name to text returned of (display dialog "Rename this file to..." default answer "" with title "Rename File" with icon POSIX file "/Applications/BBEdit.app/Contents/Resources/BBEditApplication.icns") | |
end tell | |
tell application "BBEdit" | |
set theFile to file of front document | |
end tell | |
tell application "Finder" | |
set ext to "." & name extension of file theFile | |
set name of file theFile to new_name & ext | |
end tell | |
tell application "BBEdit" to activate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment