• 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
Detect if third word in string contains a number
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Detect if third word in string contains a number


  • Subject: Detect if third word in string contains a number
  • From: theDaniel <email@hidden>
  • Date: Sun, 06 May 2012 22:07:54 -0400

Hi List,

How can I make this work?:

tell application "System Events" to keystroke "c" using command down --copy
get the clipboard
set _selection to result as text --> I am 12

if word 1 of _selection is "I" and word 3 of _selection contains (number) then


say "contains a number" using "Bruce"
else
say "contains no numbers" using "Victoria"
end if

Thanks for your help,
-Daniel
 _______________________________________________
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: Michelle Steiner <email@hidden>
    • Re: Detect if third word in string contains a number
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Create a 1 pdf of assets not using an app first
  • Next by Date: Re: Detect if third word in string contains a number
  • Previous by thread: AUTO: Allyn Martin is out of office.
  • Next by thread: Re: Detect if third word in string contains a number
  • Index(es):
    • Date
    • Thread