Re: Simple if .. else .. then statment
Re: Simple if .. else .. then statment
- Subject: Re: Simple if .. else .. then statment
- From: Michelle Steiner <email@hidden>
- Date: Sat, 29 May 2004 09:01:07 -0700
On May 29, 2004, at 8:11 AM, Rick Davis wrote:
I think I need to step away from the computer. What should be a
simple thing is stumping me. How do I tell my script to look at a
list of items and perform a task if a condition is met and skip to the
next item in the list if the condition is not met?
You don't need "else" in this situation because there is no else to do.
set aList to {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
repeat with anItem in aList
if anItem mod 2 is 0 then
display dialog (anItem as text) & " is even"
say (anItem as text) & " is even."
beep
end if
end repeat
--
We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
_______________________________________________
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.