Re: Why doesn't this script work?
Re: Why doesn't this script work?
- Subject: Re: Why doesn't this script work?
- From: Laine Lee <email@hidden>
- Date: Sat, 03 Nov 2007 09:48:19 -0500
- Thread-topic: Why doesn't this script work?
On 11/3/07 5:52 AM, "Mark J. Reed" <email@hidden> wrote:
> On 11/2/07, Laine Lee <email@hidden> wrote:
>> OK, and why doesn't this script work?
>
> [...]
>
>> do shell script tmpfile & space & "> /dev/null 2>&1 &"
>
> I'm not sure, but if you get rid of the ">/dev/null 2>&1", you might
> receive a clue as to why it's not working. :)
Well, having since reviewed some of the release notes, I now see that I
don't need to quote quite so deeply if I want to execute a script file:
("...you can make a plain text AppleScript script into a Unix executable by
beginning it with the line #!/usr/bin/osascript and giving it execute
permission...").
However, I was also able to construct this version of the original script,
which appears to do the job.
set dutydaemon to
"Dora:System:Library:LaunchDaemons:com.apple.backupd-auto.plist"
do shell script "chmod" & space & "a+w" & space & (quoted form of (POSIX
path of dutydaemon)) with administrator privileges
tell application "System Events"
tell property list file dutydaemon
set value of property list item 4 of it to 7200
end tell
end tell
do shell script "chmod" & space & "go-w" & space & (quoted form of (POSIX
path of dutydaemon)) with administrator privileges
_______________________________________________
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