I Need help to finish a folder secure Script


magdan

New Member
Joined
Nov 24, 2008
Messages
4
Reaction score
0
Hi,
I wish that someone could help me in writing an Apple Script to limit access to a specific folder, by that, I mean, to change the Ownership & Permissions of that folder (in it's get Info) to : no Access

this would only be a dissuasive means of opening this folder.

As far as now (I'm an absolute beginner in AppleScript), I've wrote a script to promt a dialog asking for a password…
What I wish to do is :

1. Attach the AppleScript to the specific folder (so, when an intruder doubleclicks on it, the Apple Scripts starts)
2. Ask for a password for that specific folder with a (repeat twice)
3. If the answer is right, than, modifiy the Ownership & Permission to : Read and Write (and make the folder visible if it was hidden)
4. Else (if these are already in : Read and Write) change the Ownership & Permission to : No Access (for everyone : Owner, Group, Others)
5. And, (in the Else) if the answer is wrong, hide the folder.
6. And finally, (if the answer is right) restore everything to normal (reset pribileges and visibility)…

Here is the result of what I could understand from Apple Script :

set prompt to "Password?"
repeat 3 times
set dialogResult to display dialog prompt ¬
buttons {"Annuler", "OK"} default button 2 ¬
default answer "Wrong" with icon 1 with hidden answer
set thePassword to text returned of dialogResult
if thePassword is "pass" then
exit repeat
else
if thePassword is not "pass" then
display dialog "Wrong"
end if
end if
end repeat
if thePassword = "pass" then
display dialog "OK"

end if

So, to resume :
1. How does one attache a script to a specific folder (or item)?
2. How can an Apple Script access the "Ownership & Permission" (in the Get Info, of that specific folder or item) and changes its values?
3. How can an Apple Script restore (or reset) these values to their original state?

I'm French and I spent two days reading (searching really!) the English Apple Script Language Guide… trying to create a dissuasive Script to prevent my kid's friends to acces some of my folders with whatever I could gather. But this doesn't look like a friendly and intuitive Guide to me…!

Thanks for any help!

Dan
 

Attachments

Ad

Advertisements

magdan

New Member
Joined
Nov 24, 2008
Messages
4
Reaction score
0
Merci beaucoup Charles,
merci pour la suggestion! Je vais vérifier ce gratuitiel. J'aimerais bien par contre, pour apprendre, obtenir des détails aux questions posées... Vous connaissez des spécialistes d'AppleScript?

Dan
 

magdan

New Member
Joined
Nov 24, 2008
Messages
4
Reaction score
0
Merci beaucoup Charles,
merci pour la suggestion! Je vais vérifier ce gratuitiel. J'aimerais bien par contre, pouvoir apprendre et obtenir des réponses précises (!) aux questions posées... Vous connaissez des spécialistes d'AppleScript?

Dan
 
Ad

Advertisements

magdan

New Member
Joined
Nov 24, 2008
Messages
4
Reaction score
0
Bonjour,

Try LameSecure (freeware). It seems to do what you are attempting. :)

Regards,

Charles
I tryed LameSecure, which works very fine! I think that it changes the status of a folder to that of an application and then ask for a password. I learned yesterday, how to attached a Script to a folder (or a file), so, I'm making little progress…

Nonetheless, this is the closest application to what I was looking for! Thanks again!
Take care.

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top