• 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: Shane Stanley <email@hidden>
  • Date: Mon, 07 May 2012 12:12:53 +1000

You try to coerce it to a number:

try
(word -1 of _selection) as number
say "contains a number" using "Bruce"
on error
say "contains no numbers" using "Victoria"
end

--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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

  • Follow-Ups:
    • Re: Detect if third word in string contains a number
      • From: theDaniel <email@hidden>
References: 
 >Detect if third word in string contains a number (From: theDaniel <email@hidden>)

  • Prev by Date: Detect if third word in string contains a number
  • Next by Date: Re: Detect if third word in string contains a number
  • Previous by thread: 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