Automate Multiple Designs Based on Given Text
Copy link to clipboard
Copied
Hey all,
I have several different designs that mostly consist of a simple graphic (border, various shapes, etc), with a string of text. What I'm looking to do, is to automate the process of generating each design for any given text. For example, I would like to run a script, give it the desired text, and have it run through the various designs and auto scale the graphic around the text (fitting a rectangle around it for instance), and save a .png for each. Is this possible? I have some, but pretty basic programming experience. Any guidance, suggestions, tutorials, etc would be very much appreciated. Thanks!
Below are a couple examples.
Explore related tutorials & articles
Copy link to clipboard
Copied
If I understand what exactly you want then perhaps your task can be automated using variables and data sets. I do not have enough informations for now:
Effects/graphics that you want to apply are always graphic files or layer styles/filters? It is desired/required that you have separate files.
Do you need some effects clipped and other just placed behind? If the answer is yes then task will be probably too complicated for data sets.
Copy link to clipboard
Copied
No later styles/filters, just simple graphics. For example, in the second of my images "Lincung Studio", I would like to recreate this design for several different brand names. Manually, if I replace this text with something else, like "Automate This Design", then I also have to manually resize the red graphic underneath to fit the text. This is what I'd like to have automated, and for several different designs.
I agree, I could easily replace text with variables and data sets, however I need the graphic to also auto scale around the changing text.
Thoughts? Thanks for the help!
Copy link to clipboard
Copied
I was thinking about same text with different backgrounds what can be done with data sets relatively easily, you just size layer below to dimension which you need then fit graphic(s) using data sets.
If you want to use same graphic with different text all the time and to fit graphic to text then variables are not ideal. Maybe it is possible to automate with actions and here is guideline:
- Duplicate text layer and move it below original text layer.
- Convert duplicated text layer to Smart Object layer.
- Edit Smart Object layer content and place graphic which should fit inside bounds.
- Hide text layer and save/close.
This is only generic guideline which needs experimentation and tweaks while recording action. It is just idea to get you in some direction.
Copy link to clipboard
Copied
Ok, how about this simplified version with no changing graphic dimensions: Lets say I have 10 different psd files each with a different graphic similar to the red ribbon in the second image above. These graphics are of fixed size, and I would like the same text applied to all 10 files automatically, so I can generate several several designs with different words very quickly. This would also require that the text auto scale to fit within a given bounding box.
So, to be very clear, I would like to be able to input any text ("My Awesome Design" for example), and have a script run through all the different psd files, applying this text and auto-scaling it to fit a given bounding box. Is this possible?
Copy link to clipboard
Copied
Start with explanation above. Instead of having graphic files saved you will need to save file with text which will be placed into design. The process should be the same: duplicate layer with graphic, move it at the bottom, convert to smart object and so on. To be able to accomplish task you must name layers with graphics with common name to be able to select them using direct selection or they must share common position in the layer's stack.
Try and ask more if you need additional help I am writing everything straight from my head and experience for now so I can not provide you more precise information's, I will rely on your skills.
Copy link to clipboard
Copied
Great, thanks. I think I'm getting closer. Is there a way to auto-scale text to fit a certain shape or dimension? For example, if I have a rectangle of dimensions 1000px x 750px, can I assign the text a certain percentage of these dimensions so that as I scale the rectangle, the text also scales with it? a = 1000px, b = 750px, then text dimension X = a*1.5 for example
Copy link to clipboard
Copied
The only way I can think of is already explained: scale rectangle or duplicate of rectangle to 75%, convert to smart object then edit and place text. Scaling text layer to 75% of something else in the document is not possible using actions, as far as I know.
Copy link to clipboard
Copied
If you want to use logic like that you need to look into Photoshop Scripting Action can not use logic without using some Photoshop scripting. Conditionsl action only support a few conditions none are related to specfic sizes. There is a Photoshop Scripting forum. However you need to be able to programs in JavaScript, VBS or Apple Script to use Photoshop scripting. Photoshop Scripting
Copy link to clipboard
Copied
I think you need to give us more details of what you have what to want to do and provide details of how you manually do the process now. What you wrote is lacking specifics. It is not smart and extremely simple.
Copy link to clipboard
Copied
Hi, Retsied​ have you posted additional questions in this thread or not? I am receiving emails with additional posts in this thread. Strange thing is that I cannot access them to answer, every time I am opening blank page with error message.
Copy link to clipboard
Copied
Yes, I had made a couple additional posts that I soon after found the answer to, so deleted the post. Thanks fro attempting to help though. I did have another scripting question, however.
I'm trying to figure out a way to save a png, in which the filename is the same as the psd, plus some given text at the end.
For example, if I have two .psd files named "Apple.psd" and "Orange.psd", I would like to be able to run the same script or action to save these files as "Apple_addedText" and "Orange_addedText", where addedText can be anything that I define in the script or action.
Copy link to clipboard
Copied
I have tutorial on that topic, here it is https://www.designeasy.co/2014/07/how-to-add-prefix-and-suffix-to-file.html
If you have any additional question, please do not hesitate to ask.
Alternatively you ca use Adobe Bridge for that task, here is tutorial https://www.designeasy.co/2012/12/batch-rename-any-kind-of-files-in-adobe.html
It is not covered exactly as you need to configure fields, take a look at screenshot below:
Copy link to clipboard
Copied
I'm trying to figure out a way to save a png, in which the filename is the same as the psd, plus some given text at the end.
For example, if I have two .psd files named "Apple.psd" and "Orange.psd", I would like to be able to run the same script or action to save these files as "Apple_addedText" and "Orange_addedText", where addedText can be anything that I define in the script or action.
Please don’t make the same request in two different posts, it is discourteous and leads to wasted effort by different folk that are generously trying to help that did not know that you asked the same question elsewhere and already received a reply.
Cross posted and answered here:
Re: "Save as" png with same name as psd plus "-01" or some given text
In the topic thread linked above I provided a script to batch process a folder of PSD files and create PNG files with a user defined suffix.
If one does not wish to batch save the images and the idea is to save the current open image only, then a custom script can be written… or the Image Processor Pro script can actually be recorded into an action (the recorded IPP action step is shown as blank, but it is actually there and it does work):

