Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Application to let user choose if they hidden files to be visible or not.
--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