yichao firstname, zeaster nickname, zhang lastname

show hidden files in mac os x

using AppleScript to show hidden files, switchHidden.scpt

tell application "Finder" to quit
display dialog "Show Hidden Files..." buttons {"ON", "OFF"} default button 1
copy the result as list to {buttonpressed}
try
if the buttonpressed is "OFF" then do shell script "defaults write com.apple.finder AppleShowAllFiles FALSE"
if the buttonpressed is "ON" then do shell script "defaults write com.apple.finder AppleShowAllFiles TRUE"
end try
tell application "Finder" to launch

No comments: