Created
February 18, 2013 23:33
-
-
Save jasonburk/4981747 to your computer and use it in GitHub Desktop.
Application to let user choose if they hidden files to be visible or not.
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
--Jason Burk | jasonburk@gmail.com | twitter: @twothirtyam | app.net: @burk | |
--http://230.am | |
--Application to let user choose if they hidden files to be visible or not | |
set mainList to {"Show Files", "Hide Files"} | |
choose from list mainList with prompt "Would you like to show hidden files or re-hide them?" | |
set listchoice to result as text | |
if listchoice = "Show Files" then | |
tell application "Terminal" | |
do shell script "defaults write com.apple.Finder AppleShowAllFiles TRUE" | |
delay 2 | |
do shell script "killall Finder" | |
end tell | |
else if listchoice = "Hide Files" then | |
tell application "Terminal" | |
do shell script "defaults write com.apple.Finder AppleShowAllFiles FALSE" | |
delay 2 | |
do shell script "killall Finder" | |
end tell | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment