• 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
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exiting a repeat


  • Subject: Exiting a repeat
  • From: "Steve Suranie" <email@hidden>
  • Date: Tue, 14 Jan 2003 09:50:52 -0500
  • Thread-topic: applescript-users digest, Vol 3 #1242 - 12 msgs

Hi all:

Can anyone help me out with this. I'm validating file names and want to give the user some options when a wrong one is encountered. I'd like them to be able to rename or ignore a file. The way I was doing this is to have a list of files (that were added to a hot folder) and then loop through the list validating each file name and then moving them to their final destination. My code would go something like this:

repeat with thisItem in theNewItemList
set thisItem to thisItem as string
set magID to text 1 thru 2 of thisItem

if magIDArray does not contain magID then

display dialog "Error....with buttons {"Rename File", 'Ignore File"}
set selectedButton to result
set optionSelected to text of selectedButton as string

if optionSelected = "Rename File" then

display dialog "Enter new file name " default answer thisItem
else


HERE IS WHERE I GET STUCK - HOW DO I EXIT OUT OF THIS INSTANCE OF THE
REPEAT LOOP AND MOVE ON TO THE NEXT ITEM IN THE LIST

end if --optionSelected


end if --magID check

end repeat --looping through new item list

Any help would be appreciated

Steve
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Scripting QuarkXPress from OS X
  • Next by Date: Re: Scripting QuarkXPress from OS X
  • Previous by thread: Barcode problem
  • Next by thread: RE: Exiting a repeat
  • Index(es):
    • Date
    • Thread