• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem with AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with AppleScript


  • Subject: Re: Problem with AppleScript
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 11 Dec 2006 16:29:11 -0600

You can open the Accounts preference pane with just this ...

tell application "Finder"
(path to library folder from system domain) as alias
open (file "Accounts.prefPane" of folder "PreferencePanes" of the result)
end tell


Now you have to use System Events only to click the unlock button.


On Dec 11, 2006, at 2:37 PM, Terry Sheltra wrote:

Hello everyone,

I wrote a small AppleScript utility to put on a new user's Mac that will automatically open up System Preferences in the Accounts pane, where they can change their password. The weird problem I am having is that the script works with no problems on my PowerBook G4, but when I run it on an Intel MacBook or MacBook Pro, I get the following error message:

NSReceiverEvaluationScriptError: 4

The script is as follows.  Sure hope someone can help me out!

Thanks!


activate application "System Preferences"

tell application "System Events"
	tell process "System Preferences"
		application "System Preferences"
		delay 0.5
		tell menu bar 1
			tell menu bar item "View"
				tell menu 1
					click menu item "Accounts"
				end tell
			end tell
		end tell
	end tell
end tell

activate application "System Preferences"

tell application "System Events"
	tell process "System Preferences"
		application "System Preferences"
		delay 1
		click button "Click the lock to make changes." of window "Accounts"
	end tell
end tell

Terry Sheltra, Public Mac Support Technician
University of Virginia School of Architecture
w:434.982.3047     e:email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
Archives: http://lists.apple.com/mailman//archives/applescript-users


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Problem with AppleScript
      • From: Christopher Nebel <email@hidden>
References: 
 >Problem with AppleScript (From: Terry Sheltra <email@hidden>)

  • Prev by Date: Re: Problem with AppleScript
  • Next by Date: Re: Compiled script question
  • Previous by thread: Re: Problem with AppleScript
  • Next by thread: Re: Problem with AppleScript
  • Index(es):
    • Date
    • Thread