Select Font Randomly

I’m looking for a way to change the parameter for the font on the Text top externally. Essentially I’m going to make a chop execute that randomly changes the font every 10 secs. Is there some way to expose this parameter so fonts can be chosen as an index of a list?

I tried just creating a table of fontfile names on my computer exporting them to the parameter name but it seems like the file name is not necessarily the smae as the font name.

You can get the list of valid things to set that par to from op(‘text4’).par.font.menuNames. If you want to set it by index you can generate a random number from 0 to len(op(‘text4’).par.font.menuNames) and then set op(‘text4’).par.font.menuIndex to that.