Re: Detect if third word in string contains a number
Re: Detect if third word in string contains a number
- Subject: Re: Detect if third word in string contains a number
- From: Nigel Garvey <email@hidden>
- Date: Sat, 12 May 2012 11:01:41 +0100
theDaniel wrote on Fri, 11 May 2012 19:23:17 -0400:
>I don't quite understand everything, but there seems to be a bug
somewhere.
>If I put one non-number word on the clipboard (ex. "he", "winds"), then
>condition 2 is called (?)
It's not a bug. The code I gave you is a framework you can develop to
handle your stated difficulty "Which of the three words in this text is
the number between 1 and 36 and what happens in each case?" Totally
different situations such as "What happens if there's only one word and
it's not a number?" will obviously need to be caught and catered for
separately.
if ((count _selection's words) < 3) then
-- Deal with less than three words here.
else
-- The code I gave you.
end if
NG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden