In fact, you are right. It does work. The input file was corrupted by
text edit. when I opened and saved it back out with bbedit and ran it
again, it worked great! Thanks a zillion. I thank you, my jabberwocky
thanks you.
Well, my braiin is almost dry. time to go put it back in and see how it
works now that it's been washed.
*Sniff-sniff*.
mmmm peppermint.
Joshua
In article <joshuafwhalen-FF96D4.17010029082007@[EMAIL PROTECTED]
>,
Joshua Whalen <joshuafwhalen@[EMAIL PROTECTED]
> wrote:
> that's me---No brains! I should know how to do this, I've done it
> before, but it's one of those weeks when you feel like someone took out
> your brain, dipped it in maple syrup, and then let it harden for a few
> days before sticking it back in your head.
>
> Here goes:
>
> the script code below is supposed to read in a file containing data
> formatted like this:
>
> Tuesday, August 28, 2007 1:14:00 PM; clash; 638.566666666667
> Tuesday, August 28, 2007 1:18:00 PM; Frida_Hyvonen; 31.1
> Tuesday, August 28, 2007 1:20:00 PM; bjork; 183.716666666667
> Tuesday, August 28, 2007 1:22:00 PM; reggae; 121.833333333333
>
> and first create a list in which each line is one list item. then, it's
> supposed to take each line of that list, and treat that as a list in
> which each field of the above is a seperate item. So when I run the
> code, I get this error:
>
> "can't get every text item of 1"
> now I know this is something easy. I've looked in the manuals, both the
> language guide and the excellent o'reilly books, but I'm playing with
> syrup-damaged brain here today folks, and I'm sure anyone over 40 (like
> me) who's ever had a week of solid all-nighters thrown on his back knows
> what I mean, so could some kind soul help me out?
>
> keep in mind, this is "problem-solving" code here. It's a subset of a
> larger app, and a few lines are here for debugging or checking to see if
> some data is being gotten correctly (the number dialog, for example)
>
> Thanks in advance!
>
> Time to go wash my brain.
>
> Now where did I leave the peppermint soap?
>
> Joshua
>
> the problem script is here:
>
> global thecount
> set text item delimiters to (ASCII character 10)
> read file "ibook:Users:joshua:Desktop:ShowTextTest.txt"
>
> set MyJabberwocky to every text item of the result
>
> count every text item of MyJabberwocky
> set thecount to the result
> display dialog thecount as number
>
> repeat with i from 1 to the count of MyJabberwocky
> set text item delimiters to " ; "
>
> set MyStuff to every text item of i
>
> --choose from list MyStuff
> get item 1 of MyStuff
> set Mydate to the result
> get item 2 of MyStuff
> set myShow to the result
> get item 3 of MyStuff
> set myRun to the result
> end repeat
>
>
> choose from list MyJabberwocky
> display dialog the result as text


|