Open Menu
Close Menu
Apple
Shopping Bag
Apple
Mac
iPad
iPhone
Watch
TV
Music
Support
Search apple.com
Shopping Bag
Lists
Open Menu
Close Menu
Terms and Conditions
Lists hosted on this site
Email the Postmaster
Tips for posting to public mailing lists
Re: Detect if third word in string contains a number
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Re: Detect if third word in string contains a number
Subject
:
Re: Detect if third word in string contains a number
From: Thomas Fischer <
email@hidden
>
Date: Sun, 13 May 2012 12:13:51 +0200
Hi Daniel,
there is a logical error in your script.
The loop
repeat
with
thisWord
in
_selection
's
words
…
will run until a number is encountered, else it will run through all the words.
Thus the case of failure is
numberWordNumber = count of (_selection
's
words
) +1
Thus your evaluation should start with
if
(
numberWordNumber
> (
count
(
_selection
's
words
)))
then
say
"There is no number in the selection."
else
if
(
numberWordNumber
is
1)
then
…
Best
Thomas
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
References:
>
Re: Detect if third word in string contains a number
(From: Nigel Garvey <email@hidden>)
>
Re: Detect if third word in string contains a number
(From: Nigel Garvey <email@hidden>)
>
Re: Detect if third word in string contains a number
(From: theDaniel <email@hidden>)
Prev by Date:
Re: List of aliases contains alias
Next by Date:
Droplet References Bug
Previous by thread:
Re: Detect if third word in string contains a number
Next by thread:
Re: Detect if third word in string contains a number
Index(es):
Date
Thread