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

Exiting a repeat loop if not false


  • Subject: Exiting a repeat loop if not false
  • From: Jay Louvion <email@hidden>
  • Date: Thu, 25 May 2006 13:34:49 +0200
  • Thread-topic: Exiting a repeat loop if not false

Title: Exiting a repeat loop if not false

The following works only if I get it right the first time (entering 123, for ex.); If I type a false answer, i.e. “qwertz”, the repeat loop never exits, even when entering a correct answer afterwards. Is there a simpler way of doing this ?

set AllowExit to true
repeat
   set OrderNum to ""
    set OrderNum to text returned of (display dialog "Numéro de la commande (sans le \"LG\") ?" default answer "")
    try
       set OrderNum to (OrderNum as integer)
    on error
       set AllowExit to false
   end try
   if AllowExit is true then exit repeat
end
repeat

TIA,

j.

Jay Louvion
Studio Casagrande
3, rue Müller-Brun
1208 Geneva

T+4122 840 3272
F+4122 840 3271

skypeme:
jaylouvion

www.studiocasagrande.com


P Please consider the environment before printing this email.

 _______________________________________________
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

  • Follow-Ups:
    • Re: Exiting a repeat loop if not false
      • From: dev_sleidy <email@hidden>
    • Re: Exiting a repeat loop if not false
      • From: Bob Studer <email@hidden>
    • Re: Exiting a repeat loop if not false
      • From: kai <email@hidden>
    • Re: Exiting a repeat loop if not false
      • From: Yvan KOENIG <email@hidden>
    • Re: Exiting a repeat loop if not false
      • From: "John C. Welch" <email@hidden>
  • Prev by Date: Re: Searching for cells/rows/columns in Excel
  • Next by Date: Re: Exiting a repeat loop if not false
  • Previous by thread: Re: Error in script
  • Next by thread: Re: Exiting a repeat loop if not false
  • Index(es):
    • Date
    • Thread