Re: Why doesn't this script work?
Re: Why doesn't this script work?
- Subject: Re: Why doesn't this script work?
- From: Christopher Nebel <email@hidden>
- Date: Fri, 2 Nov 2007 16:24:55 -0700
On Nov 1, 2007, at 11:08 PM, Michelle Steiner wrote:
It doesn't return any errors, but it doesn't do anything either. I
suspect that it is a permissions issue, but I have no idea of how to
address it.
tell application "System Events"
tell property list file
"Dora:System:Library:LaunchDaemons:com.apple.backupd-auto.plist"
set value of property list item 4 of it to 7200
end tell
end tell
Permissions is a good guess, since at least on my system, that file is
only writable by root. Since System Events doesn't have a way to
authenticate file operations, the best I can suggest is to change the
permissions on the file -- 'do shell script "chmod a+w /System/Library/
LaunchDaemons/com.apple.backupd-auto.plist" with administrator
privileges' should do the trick.
Beware that "property list item 4" is not reliable. Property list
items in a dictionary (such as this one is) are not in any
deterministic order, and may move if the file is changed. Referring
to them by name (e.g., 'property list item "StartInterval"') is a much
better way to go.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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/archives/applescript-users
This email sent to email@hidden