This will run through all of the cast members in a given movie and see if they contain a specified font. Useful when you need to switch out a font and you want to find out for sure that you have changed all of the members in your project.
on getFontUse vFont----------------------------------
--Mike Blaustein 11/27/05
--mblaustein@gmail.com
--
--If you find this script useful, let me know. Use it for whatever you want.
--
--USAGE: vFont is a STRING- the font you are searching for
--
--EXAMPLE: getFontUse "Arial"
--
--That will give you a linear list with all cast members of
--all castlibs that contain that font.
---------------------------------------------------
--make a list to save the returns
membersWithThisFont=[]
repeat with iCastLib=1 to the maxInteger --repeat with all cast libs
if castlib iCastLib=void then exit repeat
repeat with iMember=1 to the maxInteger --In each castlib, go through each member
if member(iMember,iCastLib).cast=void then exit repeat
--we only care about the #text or #field members
if member(iMember,iCastLib).type=#field or member(iMember,iCastLib).type=#text then
--go through each character and if the font matches
repeat with iChar=1 to member(iMember,iCastLib).char.count
if member(iMember,iCastLib).char[iChar].font=vFont then
membersWithThisFont.append(member(iMember,iCastLib).string)
exit repeat
end if
end repeat
end if
end repeat
end repeat
--put the list into the message window
put membersWithThisFont
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA