What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Scripting Random font script


Lamcat

New Member
Messages
3
Likes
0
Hi
I am looking for a script that chooses random fonts from 05 fonts listed for my selected text.
Thank you.
 

[ iLLuSioN ]

Power User
Messages
373
Likes
384
Code:
var Fonts = ["Impact", "Arial-BoldMT", "Tahoma", "TimesNewRomanPS-ItalicMT"]; //postscript names

var aL = activeDocument.activeLayer;
var NoF = Fonts.length;
var rFont = (Fonts[Math.floor (Math.random()*NoF)]);
aL.textItem.font = rFont;
 

Top