Re: adding to a list selected from a list of lists (Paul Berkowitz)
Re: adding to a list selected from a list of lists (Paul Berkowitz)
- Subject: Re: adding to a list selected from a list of lists (Paul Berkowitz)
- From: paul withey <email@hidden>
- Date: Tue, 19 Feb 2002 22:06:29 +0000
On Tuesday, February 19, 2002, at 04:39 , applescript-users-
email@hidden wrote:
Paul, thanks for your reply....
>
OK. Stop here. You're going to need to know the most basic things about
>
AppleScript syntax before you can do anything with it. First of all,
>
AppleScript's "English-like" language means that, probably unlike almost
>
every other programming language out there, you only use the "=" sign
>
as a
>
statement to _state_ that something (already) is equal to something
>
else,
>
just as you do in English, arithmetic, or algebra. And that can be
>
tested to
>
be true or false. You don't use "=" to set some new variable to be
>
equal to
>
something else. For that, you use the term "set to". Thus, what you
>
want to
>
do here is
>
>
set list1 to {"1", "2", "3"}
>
set list2 to {"3", "4", "5"}
>
set the_lists to {"list1", "list2"}
sorry for the confusion, this was a typo on my part just to illustrate
an example of the problem i am having..
within the script the lists are actually defined as follows
property rock_cheese : {"string of text1", "string of text2 "}
This is so that the additions to the list made by the user are retained
over runs of the applet
>
>
You should not put "list1", "list2" into quotes in the third line if in
>
fact
>
you're trying to make a list consisting of the first two lists. You
>
should
>
do
>
>
set the_lists to {list1, list2}
>
>
But I'm trying to work out what choice you really want to present to the
>
user here.
>
as you correctly worked out i would like to present the user with a
list of lists they have created and my default
lists not the actual contents of the lists...
>
>
--now you must specify what you actually want done
>
>
if theChoice is false then
>
return -- cancel button
>
else if theChoice = {"list1"} then
>
set theChoice to list1
>
else
>
set theChoice to list2
>
end if
>
--> {"3", "4", "5"}
it would be possible to hard code the assignments as above if there was
a fixed number of lists, however the applet
will permit the user to create their own lists and so would need to
cater for an unknown number of lists. this was
why i was trying to use the results of the "choose from list" command as
part of the "copy to..."
>
You can learn about AppleScript syntax from tutorials at the AppleScript
>
website, from modules you can download there, from links to Bill
>
Briggs'
>
tutorials there, from the AppleScript Language guide you can download
>
there
>
free, from the O'Reilly book "AppleScript in a Nutshell", available
>
everywhere, and from an older book "Danny Goodman's AppleScript
>
Hanbook",
>
available from amazon.com.
>
already have the nutshell book and also fatbrains "applescript
langauge guide"...will check out danny goodmans
thanks for the hint...
>
>
>
> Also, as an aside, does anyone know of a good site with examples of
>
> scripts for osX's Mail application ?
>
>
>
No, sorry. Checkout <http://macscripter.net> - Script Builders link and
>
>
<http://www.applescriptcentral.com/>
>
>
thanks for the links...
>
paul
_______________________________________________
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.