• 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
get words of text fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

get words of text fails


  • Subject: get words of text fails
  • From: Malcolm Fitzgerald <email@hidden>
  • Date: Fri, 05 Nov 2004 08:40:41 +1100

I'm getting an error running this code.

applescript version 1.9.3
Mac OS X version 10.3.5

--
display dialog "What logs shall we analyse?" default answer
"102004-112004" -- ie, mmyyyy-mmyyyy.
set x to text returned of the result
set {firstMonth, finalMonth} to every word of x

-- error: can't get item 2 of {"102004"}

It's choking on the hyphen but what happened to the rest of the string?

Trying several examples shows that it's treating alphabetical and
numerical characters differently.

"merry-go-round"
-- can't get item 2 of {"merry-go-round"}
-- at least it can return the correct string

"102004-112004/102004-112004/102004-112004"
-- {"102004","102004","102004"}
-- uh-oh!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: get words of text fails
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: Keyboard Down at Launch
  • Next by Date: Re: get words of text fails
  • Previous by thread: Re: Keyboard Down at Launch
  • Next by thread: Re: get words of text fails
  • Index(es):
    • Date
    • Thread