• 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: can't make { . . . } into an item [error message]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can't make { . . . } into an item [error message]


  • Subject: Re: can't make { . . . } into an item [error message]
  • From: monk <email@hidden>
  • Date: Sat, 14 Jul 2001 15:49:14 -0400

-- 7/14/01 10:50 am: email@hidden said:

> At 07/14/2001 10:18 -0400, monk wrought:
>
>> hi way more advanced scripters than me
>>
>> i'm making progress with my script but for the life of me i can not read
>> half a list, and set it to a variable, what is obviously with this excerpt?
>> --
>> repeat with i in _readsource
>>
>> set _item to (get some item of _readsource)
>>
>> set _1sthalf to (read _readsource as list in front of contents of _item
>> using delimiter {return, space})
> __________________________________________________________________________
>
> Hello Monk,
>
> Well now, this depends upon what your data is, and there's a bug in
> AppleScript 1.6's Read With Delimiter as List that returns a list of lists.
>
> I would approach the problem this way (I think).
>
> Datafile structure:
>
> one
> two
> three
> four
> five
> six
>
> ---------------------------------------------------------------------------
> set f to alias "Minerva:Desktop Folder:test.as"
>
> set theData to paragraphs of (read f)
>
> set firstHalf to items 1 thru ((count of theData) / 2) of theData
> ---------------------------------------------------------------------------

i'm using as 1.4.3 on os 9.04

if i didn't want to use arbitrary selection (some), then your idea of
counting data might be fine - any other suggestions?

thanks

h 'monk' elmer
--
//\/\\/\/\//\/\\/\/\//\/\\

http://www.assemblage.org


  • Prev by Date: Re: Question about repeat loop
  • Next by Date: Re: Question about repeat loop
  • Previous by thread: can't make { . . . } into an item [error message]
  • Next by thread: Re: can't make { . . . } into an item [error message]
  • Index(es):
    • Date
    • Thread