Results 1 to 2 of 2
  1. #1

    Member Since
    Dec 30, 2011
    applescript and administrator!
    I am an Applescript newbie. I wrote the following script to create a folder in MacHD>Library>Applications Support which is now write-protected in Lion (a change from Snow Leopard). It works fine, creating the folder if one of that name is not already there, skipping if folder already exists, asking for an administrator password on the way (no prob). The problem arises if the user cancels the request for the administrator password. Another request pops up, If this is canceled the script completes as if the folder had been created. How can I trap the Cancel command and cancel the whole script? Many, many thanks.


    tell application "Finder"
    make new folder at folder "Application Support" of folder "Library" of startup disk with properties {name:"foldername"}
    end try
    display dialog "The missing folder has been successfully installed." buttons {"OK"} default button 1
    end tell

  2. #2

    Member Since
    Dec 30, 2011
    Problem solved
    I've solved this problem. Sorry to bother.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Administrator password
    By ironman1 in forum OS X - Operating System
    Replies: 1
    Last Post: 07-09-2014, 10:42 PM
  2. administrator password
    By Daveo in forum OS X - Operating System
    Replies: 2
    Last Post: 05-16-2011, 03:44 AM
  3. Administrator's password
    By cirq810 in forum Switcher Hangout
    Replies: 11
    Last Post: 06-30-2009, 08:37 PM
  4. administrator password HELP!
    By pixie67 in forum Apple Notebooks
    Replies: 3
    Last Post: 11-04-2005, 11:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts