Re: Arrays in AppleScript ? [Solved]
Re: Arrays in AppleScript ? [Solved]
- Subject: Re: Arrays in AppleScript ? [Solved]
- From: Eric Morand <email@hidden>
- Date: Wed, 28 Dec 2005 20:41:43 +0100
Thanks to you Mark, Michael and has !!!
I couldn't hope for better answers !
Eric.
Le 28 déc. 05 à 20:01, Mark Lively a écrit :
On 12/28/05, Eric Morand <email@hidden> wrote:
Hi List !
This will probbably seems completely stupid to most of you
but...where are the arrays in AppleScript ?
I'm pretty sure lists are what I'm looking for but I just can't find
how to create one.
I suppose "set myArray to make new list" should work...but it
doesn't. Worse, I don't even a have clue on how to add an entry to my
array !
If someone can help, that would be great because even with Google, I
couldn't find the answer (I suppose this is so obvious to everyone
but me that it isn't documented).
Thanks,
Eric.
Concisely AppleScript doesn't have Arrays per se. It has lists which
are implemented as linked lists. It is possible to force them to be
stored as arrays(or it used to be) but there isn't much practical
purpose to it.
set foo to {} --makes an empty list
set bar to every word of "This is a test"
set baz to {} & "This" &"is"&"a"&"test" --yields the same as the
above.
--to add to foo
set foo to foo & 1
--{1}
set bar to 1&bar
--{1, "This" ,"is","a","test" }
item 3 of bar
-- "is"
-Mark
Array is like a shark except squished all flat.
=============================================
Automator Ketchup : http://automatorketchup.blogspot.com
_______________________________________________
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