Skip to content

Instantly share code, notes, and snippets.

@sixones
Created June 26, 2009 10:10
Show Gist options
  • Save sixones/136399 to your computer and use it in GitHub Desktop.
Save sixones/136399 to your computer and use it in GitHub Desktop.
tell application "Finder" to quit
display dialog "Show Hidden Files..." buttons {"ON", "OFF"} ¬
default button 2
copy the result as list to {buttonpressed}
try
if the buttonpressed is "OFF" then do shell script ¬
"defaults write com.apple.finder AppleShowAllFiles OFF"
if the buttonpressed is "ON" then do shell script ¬
"defaults write com.apple.finder AppleShowAllFiles ON"
end try
tell application "Finder" to launch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment