I Need help to finish a folder secure Script

Discussion in 'AppleScript' started by magdan, Nov 24, 2008.

  1. magdan

    magdan New Member

    Joined:
    Nov 24, 2008
    Messages:
    4
    Likes Received:
    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
     

    Attached Files:

    magdan, Nov 24, 2008
    #1
    1. Advertisements

  2. magdan

    cmcknight New Member

    Joined:
    Nov 25, 2008
    Messages:
    8
    Likes Received:
    0
    Bonjour,

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

    Regards,

    Charles
     
    cmcknight, Nov 25, 2008
    #2
    1. Advertisements

  3. magdan

    magdan New Member

    Joined:
    Nov 24, 2008
    Messages:
    4
    Likes Received:
    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, Nov 25, 2008
    #3
  4. magdan

    magdan New Member

    Joined:
    Nov 24, 2008
    Messages:
    4
    Likes Received:
    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
     
    magdan, Nov 25, 2008
    #4
  5. magdan

    magdan New Member

    Joined:
    Nov 24, 2008
    Messages:
    4
    Likes Received:
    0
    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
     
    magdan, Nov 25, 2008
    #5
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Newsbot

    Bill Frakes: Photo Finish

    Newsbot, May 19, 2007, in forum: Apple News
    Replies:
    0
    Views:
    400
    Newsbot
    May 19, 2007
  2. Newsbot

    Dorna Sports: Fast Finish

    Newsbot, Aug 31, 2007, in forum: Apple News
    Replies:
    0
    Views:
    420
    Newsbot
    Aug 31, 2007
  3. Johnny Loadmaster

    Protecting powerbook finish

    Johnny Loadmaster, Oct 28, 2003, in forum: Portables
    Replies:
    8
    Views:
    209
    Whytoi
    Nov 2, 2003
  4. rogacasa@gmail.com

    Fit and finish issue with new Powerbook G4 1.67 15"?

    rogacasa@gmail.com, Sep 9, 2005, in forum: Portables
    Replies:
    5
    Views:
    192
    Ted Lee
    Feb 23, 2006
  5. Wizumwalt@gmail.com

    how to finish editing of table cell

    Wizumwalt@gmail.com, Apr 14, 2007, in forum: Programmer Help
    Replies:
    3
    Views:
    240
    David Phillip Oster
    May 28, 2007
  6. Neo
    Replies:
    1
    Views:
    255
    Tom Stiller
    Apr 25, 2005
  7. Király

    Folder action script help please!

    Király, May 9, 2006, in forum: AppleScript
    Replies:
    8
    Views:
    394
    Király
    May 11, 2006
  8. Tim Murray

    need a script to clone folder tree

    Tim Murray, Jun 1, 2008, in forum: AppleScript
    Replies:
    18
    Views:
    483
    Tim Murray
    Jun 2, 2008
Loading...