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

RE: Exiting a repeat


  • Subject: RE: Exiting a repeat
  • From: "Rogers, Nick" <email@hidden>
  • Date: Tue, 14 Jan 2003 10:11:13 -0500

I'd try an

exit repeat

if you haven't already in your else statement. I've used this in the past,
but there may be a better way.

n

-----Original Message-----
From: Steve Suranie [mailto:email@hidden]
Sent: Tuesday, January 14, 2003 8:51 AM
To: email@hidden
Subject: Exiting a repeat

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.
_______________________________________________
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: Exiting a repeat
  • Next by thread: Re: Exiting a repeat
  • Index(es):
    • Date
    • Thread