Re: Why doesn't this script work?
Re: Why doesn't this script work?
- Subject: Re: Why doesn't this script work?
- From: Michelle Steiner <email@hidden>
- Date: Sat, 3 Nov 2007 07:59:38 -0700
On Nov 2, 2007, at 9:27 PM, Michelle Steiner wrote: Here is the penultimate version of the script; I need to put in some error checking to ensure that only a number is entered into the dialog.
Here is how I did that.
set the flag to false repeat until the flag is true try set the DialogReturn to (display dialog "Enter the backup interval you wish." default answer "1" buttons {"Hours", "Minutes", "Cancel"} default button "Hours" with title "Set Time Machine Backup Interval") set the RawNumber to the text returned of the DialogReturn as number set the flag to true set the TimeUnit to the button returned of the DialogReturn on error msg number num if num is -128 then error number -128 display alert "You must enter a number." end try end repeat
-- Michelle
-- I can't say I've never been wrong. Well, I can say it, but I'd be wrong. |
_______________________________________________
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