• 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: trying to make a list of numbers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: trying to make a list of numbers


  • Subject: Re: trying to make a list of numbers
  • From: Paul Berkowitz <email@hidden>
  • Date: Thu, 08 Jul 2004 19:33:57 -0700

On 7/8/04 7:06 PM, "Richard Allaway" <email@hidden> wrote:

> I'm new to this applescript business. Could anyone explain this to me?
>
> set theText to "30.14
> -0.25
> -0.82
> 30.13
> 30.68
> 29.95
> 19.13
> 34.19" as Unicode text
> log every word of theText
>
> -- (*30.14, 30.13, 30.68, 29.95, 19.13, 34.19*)
>
> set theText to "30.14
> -0.25
> -0.82
> 30.13
> 30.68
> 29.95
> 19.13
> 34.19" as string
> log every word of theText
>
> -- (*30.14, 0.25, 0.82, 30.13, 30.68, 29.95, 19.13, 34.19*)
>
> Obviously, I like the second version better, but those minus signs are kinda
> important. What should I do to get a list of all the numbers?

Don't log every word ; "-" is a word delimiter since it's a hyphen in
strings.

Log every paragraph, since you already have them on separate lines. That
should work correctly for Unicode as well as string and should contain the
minus (hyphen).

--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


References: 
 >trying to make a list of numbers (From: Richard Allaway <email@hidden>)

  • Prev by Date: trying to make a list of numbers
  • Next by Date: Re: trying to make a list of numbers
  • Previous by thread: trying to make a list of numbers
  • Next by thread: Re: trying to make a list of numbers
  • Index(es):
    • Date
    • Thread