Re: Newbie, every word where it contains "ox"
Re: Newbie, every word where it contains "ox"
- Subject: Re: Newbie, every word where it contains "ox"
- From: Rob Stott <email@hidden>
- Date: Thu, 08 Aug 2002 12:41:37 +0100
Hi Steen,
There may be a better way of doing it, but here's how I'd deal with the
problem, hope its of some help;
set myString to "the fox oxon can count 1 2 3 and he love nox"
set theNumberOfTheWords to the count of the words of myString
repeat with theWordNumber from 1 to theNumberOfTheWords
set theWord to word theWordNumber of myString
set theOffset to offset of "ox" in theWord
if theOffset is 0 then
display dialog "Word " & theWordNumber & " does not contain the
string you're looking for"
else
display dialog "SUCCESS! Word " & theWordNumber & " does contain the
string you're looking for"
beep
end if
end repeat
--
Rob Stott
Artwork Designer
Airfix/Humbrol Ltd
Marfleet
Kingston upon Hull
HU9 5NE
Tel: +44 (0) 1482 716691
Fax: +44 (0) 1482 781781
Mob: +44 (0) 7881 811533
'Y'know... For kids!" - Norville Barnes
_______________________________________________
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.