• 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: Why doesn't this script work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Why doesn't this script work? (From: Michelle Steiner <email@hidden>)
 >Re: Why doesn't this script work? (From: Christopher Nebel <email@hidden>)
 >Re: Why doesn't this script work? (From: Michelle Steiner <email@hidden>)
 >Re: Why doesn't this script work? (From: Christopher Nebel <email@hidden>)
 >Re: Why doesn't this script work? (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Why doesn't this script work?
  • Next by Date: Re: AppleScript-Users Digest, Vol 4, Issue 526
  • Previous by thread: Re: Why doesn't this script work?
  • Next by thread: Re: Why doesn't this script work?
  • Index(es):
    • Date
    • Thread