Passwording a Folder

how can I create a folder action that will ask for a password, comapare the password to the one prorgrammed in the script, then if the password is wrong have the folder close?

You’d have to “hard code” the pasword into the script so that it knows what to look for. Unfortunately, this also makes the password easy to track down within the script so if it’s a security issue, you’re not going to want to do it this way. Also, it would help to know what kind of folder action you want to make. When the folder opens, closes, has something added to it, etc.?

But what you’d want to do is set the password within the script either as a property or using something like

set checkPass to "THEPASSWORD"

then, get user input and compare them

set passCheck to text returned of (display dialog "Please enter the password." default text "")
if passCheck is not thePass then
--close the folder
--whatever else you want to do
end if

Hope this helps.

that will work, thanks
how do I make the text typed into the dialog box apear as hidden characters? like **** instead of blah?