I have a file which is set out like this:
125
425
124
2145
so i wrote some code which is this thinking that it would create a list with the following values
125, 425, 124, 2145
the idea being that i could then reference item X of list blah and so on.
But when i try it it doesn’t work. The code is:
property mouseCoords : "Shared G4 HD:Users:karrenmay:Desktop:upload files and fill data:mouseCoordsY49.txt" as alias
set mouseList to read mouseCoords as list --using delimiter return
set mouseCount to (count mouseList)
display dialog item 4 of mouseList
The error i get:
Can't get item 4 of {"108
128
146
165
185
202
221
242
259
280
298
318
336
354
375
393
410
433
449
469
488
507
528
549
561
583
602
622
641
660
680
696
715
734
755
773
794
813
829
850
870
892
906
925
946
963
983
1001
1017"}.
Any ideas on why this is?
Ideally i would like the file t have this sort of layout {1365, 125} can this be done and be read into a list??
Cheers