Re: Exiting a repeat loop if not false
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