Mac Help Forums


Reply
Thread Tools Display Modes

I Need help to finish a folder secure Script

 
New Member
Join Date: Nov 2008
Posts: 4
 
      24th November 2008
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
Attached Thumbnails
I Need help to finish a folder secure Script-ownership-permission.jpg  
 
Reply With Quote
 
 
 
 
Member
Join Date: Nov 2008
Posts: 7
 
      25th November 2008
Bonjour,

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

Regards,

Charles
 
Reply With Quote
 
New Member
Join Date: Nov 2008
Posts: 4
 
      25th November 2008
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
 
Reply With Quote
 
New Member
Join Date: Nov 2008
Posts: 4
 
      25th November 2008
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
 
Reply With Quote
 
New Member
Join Date: Nov 2008
Posts: 4
 
      25th November 2008
Quote:
Originally Posted by cmcknight View Post
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Folder action script issue Jo_y AppleScript 2 19th June 2009 10:34 PM
Folder action script Jo_y AppleScript 14 27th July 2008 11:29 AM
Folder action script help please! Király AppleScript 8 11th May 2006 04:24 PM
Can you Secure empty trash with script Neo Mac 1 25th April 2005 11:08 PM
How can I get script to wait until files are in folder Marina AppleScript 0 4th March 2004 10:07 AM


All times are GMT +1. The time now is 05:23 AM.
Mac-Help.com is an independent website and is not affiliated with Apple Inc.


Welcome!
Welcome to the Mac Help Forums
 


Latest Threads
Yikes! Teacher needs help!
Mollyc4627 (8 Hours Ago, 08:57 PM)

Unable to log in to websites
AMonty20 (11 Hours Ago, 05:52 PM)

Add Different Speech Commands
bae_22 (12 Hours Ago, 04:40 PM)

Login (2 macs) passwords spontaniously changed?
Roger Vaught (13 Hours Ago, 03:31 PM)

Best car charger or inverter for Macbook Pro?
imeme87 (14 Hours Ago, 03:22 PM)

 


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51