• 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: Exiting a repeat loop if not false
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exiting a repeat loop if not false


  • Subject: Re: Exiting a repeat loop if not false
  • From: dev_sleidy <email@hidden>
  • Date: Fri, 26 May 2006 04:37:24 -0400

If a number must be entered, and the number can include '0', then ...

repeat
try
set die_zahl to (text returned of (display dialog "Tragen Sie bitte eine Zahl ein. " default answer "" buttons "OK" default button "OK")) as integer
exit repeat
end try
end repeat


---

If a number must be entered, and the number cannot include '0', then ...

repeat
try
set die_zahl to (text returned of (display dialog "Tragen Sie bitte eine Zahl ein. " default answer "" buttons "OK" default button "OK")) as integer
if (die_zahl > 0) then exit repeat
end try
end repeat


---

If a number must be entered, the number cannot include '0'; and, you want the 'Abbrechen' ['Cancel', 'Decommander' (?)] button feature ...

repeat
try
set die_zahl to (text returned of (display dialog "Tragen Sie bitte eine Zahl ein. " default answer "")) as integer
if (die_zahl > 0) then exit repeat
on error number error_Number
if (error_Number = -128) then
.
< enter your error handling code here >
.
exit repeat
end if
end try
end repeat
_______________________________________________
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
References: 
 >Exiting a repeat loop if not false (From: Jay Louvion <email@hidden>)

  • Prev by Date: Moving Scripting Additions from home to system library
  • Next by Date: Re: Moving Scripting Additions from home to system library
  • Previous by thread: Re: Exiting a repeat loop if not false
  • Next by thread: whose clause with two conditions?
  • Index(es):
    • Date
    • Thread