I would like to password protect certain folders on my HD, but am unsure how to. I have copied a script that I found on this forum from my search. However, when I click the folder it opens then asks for the password. I would like it ask first, then open. Also, if I just click the “OK” button, it just opens and allows access to the files. One other problem is that I don’t know how to bullet the password as it’s being entered - the characters appear as typed. If anyone can offer some assistance it would be greatly appreciated. Thanks. I am using OSX 10.3.9 with Applescript ScriptEditor 2.0
The script I copied and used:
on opening folder This_Folder
tell application “Finder”
set dialogresult to display dialog "Please enter the password to access folder:
" & This_Folder & “” buttons {“Ok”} default button 1 default answer " "
set PWText to the text returned of dialogresult
if not PWText = “Password here” then
close folder This_Folder
beep 3
display dialog “The password entered is incorrect” buttons {“Doh!”} default button 1
end if
end tell
end opening folder