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
display dialog "Show all files?" buttons {"Show", "Hide", "Cancel"} | |
set result to button returned of result | |
if result is equal to "Show" then | |
do shell script "defaults write com.apple.finder AppleShowAllFiles -boolean true" | |
do shell script "killall Finder" | |
else if result is equal to "Hide" then | |
do shell script "defaults delete com.apple.finder AppleShowAllFiles" | |
do shell script "killall Finder" | |
end if |