• 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: Michelle Steiner <email@hidden>
  • Date: Sun, 06 May 2012 21:05:52 -0700

On May 6, 2012, at 7:07 PM, theDaniel wrote:

How can I make this work?:

set _selection to "I am 12"

if word 1 of _selection is "I" then
try
word 3 of _selection as number
say "contains a number" using "Bruce"
on error
say "contains no numbers" using "Victoria"
end try
end if

-- Michelle

-- 
"To announce that there must be no criticism of the president, or that we are to stand by the president right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public."     --Teddy Roosevelt


 _______________________________________________
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: 
 >Detect if third word in string contains a number (From: theDaniel <email@hidden>)

  • Prev by Date: Re: Detect if third word in string contains a number
  • Next by Date: Re: Create a 1 pdf of assets not using an app first
  • 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