I had to modify the script to get this to work. I changed:
tell application "CharacterPalette" to activate
to:
tell application "System:Library:Input Methods:CharacterPalette.app" to activate
I just updated today to OS X 10.8.4, don't know if that had anything to do with it. Thanks for the script.
OK, this version actually looks a little better. I may modify mine to take into account the if statements, but you may want to try this one. Teach me not to search again sine the last time I did.
http://www.alfredforum.com/topic/325-workflow-dns-cache/?hl=flush
This will allow you to flush your DNS. This uses multiple methods to hand more versions of OS X. And has a pause in the middle of about 5 seconds. It will push a notification when completed.
Just type flush and you are in business.
Not much to take credit for here, all ideas came from others.
Idea and icon taken from David Ferguson's Flush DNS script for pre 2.x Alfred and my need for a 2.x version.
Script updated to support Mac OS X 10.7 & 10.8 with info from: http://hints.macworld.com/comment.php?mode=view&cid=130223
Download the workflow here:
http://bit.ly/FlushDNSAlfred2