photoshop script - If document name matches regex -
i in situation where, after finishing work on multiple open photoshop documents, want play specific action on few of them. document names match pattern should pretty easy match regex. essentially:
-if document name 5 or 6 digits + "f", play action a. -if document name 5 or 6 digits + "fx", play action b. -if document name 5 or 6 digits + "b", play action a. -if document name 5 or 6 digits + "bx", play action b.
i gather getbyname works exact string matches, in order use regex need loop through every open doc, check regex .match, play correct action. having trouble achieving desired result.
p.s. targeted documents have never been saved , therefor have no extensions, regex pattern not need account this.
thanks!
i take after regex? try
(\d{5,6}f$|\d{5,6}b$) // action (\d{5,6}fx$|\d{5,6}bx$) // action b
Comments
Post a Comment