Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '10.7: Scripting a fix for the loss of the Command+D shortcut' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.7: Scripting a fix for the loss of the Command+D shortcut
Authored by: Lri on Jul 22, '11 08:21:29AM

You can now use ⌘⌫ (delete / backspace) for Don't Save in Lion, see ⌘D is already used an alternative shortcut for ⇧⌘D in file dialogs.

I've been using this script for a while:

	tell application (path to frontmost application as text)
		set a to do shell script "echo " & quoted form of (path to it as text) & " | sed 's/.*:\\(.*\\).app:/\\1/'"
		if {"TextMate"} contains a then
			close window 1
			tell application "System Events" to key code 51 using command down -- keystroke "d" in 10.6
			close window 1 saving no
		end if
		if (count (windows where visible is true)) is 0 then
			tell application "System Events" to keystroke tab using option down
			-- ⌥⇥ = Move Focus to Active or Next Window
		end if
	end tell
end try

[ Reply to This | # ]