主题:  怎样把演员表里所有的演员名读到列表里?

smilylee

职务:普通成员
等级:1
金币:0.0
发贴:32
#12001/3/20 9:55:33
怎样把演员表里所有的演员名读到列表里?



acneyouth

职务:普通成员
等级:1
金币:1.0
发贴:181
#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



lovem

职务:普通成员
等级:1
金币:0.0
发贴:38
#32001/3/25 16:38:42
aMemberNames=[ ]
repeat with aCast=1 to the number of castLibs
repeat with aMem=1 to the number of members of castLib aCast
add(aMemberNames,member(aMem,aCast).name)
end repeat
end repeat