Created
September 16, 2013 17:42
-
-
Save fractaledmind/6583972 to your computer and use it in GitHub Desktop.
How to skip a single item in a Repeat Block From http://stackoverflow.com/questions/1024643/applescript-equivalent-of-continue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set aList to {"1", "2", "3", "4", "5"} | |
| repeat with anItem in aList -- # actual loop | |
| try | |
| set value to item 1 of anItem | |
| if value = "3" then error 0 -- # simulated `continue` | |
| log value | |
| end try | |
| end repeat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment