I tried to recreate your Problem and noticed that you probably have not enabled the "Show all File Extensions" option in the Finder Preferences.
You can check by selecting the Finder and selecting "Preferences" from the Menubar. A small window should appear, titled "Finder Preferences". Select the "Advanced" Icon at the Top of that window. You should now see the option "Show all File Extensions", it should be checked. All files in your finder window should now show their extensions, like .txt or in your case .crt
You can now easily change all files to another extension.
If that does not work then the Fileextension is probably linked to another application. .crt-Files should link to the Keychain-Application which handels all certificates. You can check by selecting the crt-File and pressing "command" + "i". An information window should appear with additional information to that file. At the Entry "open with" should appear "Keychain.app".
You could assign a shortcut to a script like this:
tell application "System Events" to tell process "Finder"
value of attribute "AXFocusedWindow" is scroll area 1
end tell
tell application "Finder"
if result is true or number of windows is 0 then
set t to desktop
else
set t to target of Finder window 1
end if
set f to make new file at t
if t is desktop then
set selection to f
else
select f
end if
end tell
There is a bug in 10.7 and 10.8 that affects many other scripts and Automator services like this. Finder ignores new windows when getting the insertion location
and selection
properties. If you open a new Finder window, select some items in it, and run tell app "Finder" to selection
in AppleScript Editor, the result is the items selected in some window behind the frontmost window (or an empty list). One workaround is to move focus to another application and back, but it results in a visual glitch.
So neither of these ways of checking if the desktop is selected work reliably:
tell application "Finder"
insertion location as alias is desktop as alias
container of item 1 of (get selection) as alias is desktop as alias
end tell
You could also wrap the script as an Automator service, but there is another bug where the shortcuts for Automator services don't always work until you hover over the services menu from the menu bar. If the input type was set to no input, the service wouldn't show up in context menus. If it was set to folders or files, you'd have to always secondary-click some folder or file.
Related questions:
I didn't vote to close this question, because many of the solutions in the other questions are affected by either of the two bugs mentioned above. We'll likely get even more questions like this, which could then be closed as duplicates of this question.
Best Answer
If you have the Finder window open, use Spotlight to open TextEdit. When you're ready to save the file, option+drag the text file icon from the title bar of TextEdit into the Finder window where you want to save it.