Re: variable setting in repeat loop
Re: variable setting in repeat loop
- Subject: Re: variable setting in repeat loop
- From: Jan Bruners <email@hidden>
- Date: Fri, 21 Feb 2003 11:18:33 +0100
Ivan,
Ivan Andrus <email@hidden> schrieb am Donnerstag, 20. Februar 2003:
>
On Thu, 2003-02-20 at 15:24, Jan Bruners wrote:
>
>
> and another question (still learning, sorry). The following script
>
> should pack a list of variables with different values:
>
>
Don't be sorry for learning. Many never even try. You have certainly
>
come to the right place for help. I basically learned AppleScript from
>
this list.
Thanks a lot. Your hints (along with Marc Glasgow's) helped me to build a working script.
>
>
If I understand, what you want is for the variables in anzahlen to be set
>
to certain values. For this you need references.
>
>
set anzahlen to { a reference to sg10, a reference to sg13, a reference to
>
sg17} -- etc.
>
This was exactly my problem. My script now looks like this:
--snip
set anzahlen to {a reference to sg10, a reference to sg13, a reference to sg17, a reference to sg20, a reference to sg23, a reference to sg27, a reference to sg30, a reference to sg33, a reference to sg37, a reference to sg40, a reference to sg5} as list
on zaehle(string1)
tell application "FileMaker Pro"
show every record of database "scheine.fp5"
if exists (every record whose cell "ES_Note" is string1) then
show (every record whose cell "SeminarID" is semvar and cell "ES_Note" is string1 and cell "ES_Punkte" is not "")
return count of records
else
return 0
end if
end tell
end zaehle
repeat with i from 1 to count items of noten
set thenote to item i of noten
set contents of item i of anzahlen to zaehle(thenote)
end repeat
--snip
Thanks again, what a wonderful list,
Jan
--
Jan Bruners
University of Cologne
Department of German Linguistics and Literature
Albertus Magnus Platz - 50923 Koeln - Germany
_______________________________________________
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.