Re: An Applescript Cocktail
Re: An Applescript Cocktail
- Subject: Re: An Applescript Cocktail
- From: Martin Orpen <email@hidden>
- Date: Thu, 14 Apr 2005 15:59:39 +0100
Title: Re: An Applescript Cocktail
on 14/4/05 15:44, Bernard Azancot at email@hidden wrote:
> Hello scripters !
>
> I was just wondering if a script could perform MacOS X,
> daily/weekly/monthly maintenance scripts, just as Cocktail utility
> does.
This used to work OK:
with timeout of 3600 seconds
set myButton to (items of (display dialog "What task do you want to run?" buttons {"daily", "weekly", "monthly"}) as string)
if myButton is "daily" then
set x to do shell script "sudo /private/etc/daily" with administrator privileges
end if
if myButton is "weekly" then
set x to do shell script "sudo /private/etc/weekly" with administrator privileges
end if
if myButton is "monthly" then
set x to do shell script "sudo /private/etc/monthly" with administrator privileges
end if
-- ugly, but better than display dialog...
choose from list (paragraphs of x) with prompt "Read and then cancel:"
end timeout
Could do with tidying up as it’s a bit repetitive...
--
Martin Orpen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden