Hello,
I want to write a script that does the following
repeat with i from 1 to numDocs set docName to (name of document i) if (docName does not contain "blah") then continue repeat end if set tURL to (URL of document i) [..] end repeat
(Has anyone else noticed there's a (nother) rather horrendous bug in Mail 2.0's editing window regarding text display? Try creating this message [copy a script in, then type some text after the script on the next line like '[...]' here and watch the the text rendering and left-margin go crazy.. Then save and reopen the draft - text display is fine.. AARRGGGH!!! And new text that is addeded doesn't seem to render right either..)
ANYWAY.. I can't do this of course because there is no 'next repeat' command is AS (odd omision IMO, as it's in both HC and C as 'continue') I could do it like this:
repeat with i from 1 to numDocs set docName to (name of document i) if (docName does contain "blah") then set tURL to (URL of document i) [...] // else do nothing end if end repeat
But that looks kind of ugly to me (what I really want to *say* is "if this condition isn't true, skip this data. Which is not what I'm coding if here which keeps the "conclusion" [end] of the if block hanging until all the processing is done.. People processing English don't like center-embedded clauses - neither do I when writing code.. [albeit this isn't exactly a center-embedded clause, but it's close IMO])
Jim
|