document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. -- Relevant post here: http://n8henrie.com/2012/08/show-or-hide-hidden-files-on-your-mac-with-applescript/
  2. set question to display dialog "Show or hide hidden files?" & return & "Don\'t that forget this will relaunch Finder." buttons {"Show hidden files", "Hide hidden files", "Cancel"}
  3. set theAnswer to button returned of result
  4.  
  5. if theAnswer is "Show hidden files" then
  6.     do shell script "defaults write com.apple.Finder AppleShowAllFiles TRUE && killall Finder"
  7. end if
  8. if theAnswer is "Hide hidden files" then
  9.     do shell script "defaults write com.apple.Finder AppleShowAllFiles FALSE && killall Finder"
  10. end if
  11.  
  12. if theAnswer is "Cancel" then
  13.     return
  14.    
  15. end if
');