#22001/3/20 13:43:24
下面的程序可统计一个指定的castLib的所有member的名字:
numofmem=the number of members of castLib("any castlib")
repeat with temp=1 to numofmem
s=the name of member temp of castlib "any castLib"
add listName,s
end repeat
如果不想每次都指定castLib,可以使用以下的方法,其中关键的是"do"命令。
global list1[],list2[],list3[],list4[]......
n=the number of castlibs
repeat with i=1 to n --统计每个cast中有多少member,将member的名字写入list[i]中
add listpoint,1 --初始化listpoint
ends=ends & "1" --ends用于检测各演员表是否已被读完
numofmem=the number of members of castlib i
listname="list" & string(i)
repeat with temp=1 to numofmem
s=the name of member temp of castlib i
do "add " & listname & ",s" --相当于执行了 add listname,s
end repeat
do "sort " & listname
end repeat