tell application "Finder" to quit
display dialog "Show Hidden Files..." buttons {"ON", "OFF"} default button "ON"
copy the result as list to {buttonpressed}
(*try
if the buttonpressed is "OFF" then do shell script "defaults write com.apple.finder AppleShowAllFiles OFF"
if the buttonpressed is "ON" then
set the_password to "password" --set this to the password you want to use
set correct_pass to false
set the_dialog to "Please enter your password:"
repeat while correct_pass is false
display dialog the_dialog default answer "" buttons {"Cancel", "OK"} default button 2 with icon 0 with hidden answer
if the text returned of the result is the_password then
do shell script "defaults write com.apple.finder AppleShowAllFiles ON"
else
beep
set the_dialog to "Incorrect password." & return & "Please enter your password:"
end if
end repeat
end try
*)
tell application "Finder" to launch
the middle part is what im stuck on if you could help that would be great!