?
Solved

Help with Photoshop Actions. Dynamic Text.

Posted on 2007-08-01
3
Medium Priority
?
1,580 Views
Last Modified: 2013-12-25
Hi there,

We're trying to automate a process in Photoshop but we're getting stuck at the point where we need to type in Text. You see the idea is to create around 465 png files that contain different text in each file.

Here's how it needs to work.

Create a New File Say 400x600

Add a new Text Layer (the text needs to be read from another file or the file name) the first time round it will be January 1st the second time it should read January 2nd, the third time should be January 3rd, well you get the idea, we're trying to put each individual date on each photoshop document.

Then the text layer needs to be rasterized

Then it will need to be skewed V: -9.3 degrees

Then it needs to be centered at X: 200px and Y: 300px

Then it needs to be saved as a .png with the date as the file name (eg: january-1st.png) and have the background transparent.

Is this possible?

I don't have a lot of experience with Photoshop Actions but I thought maybe there is a way to get the text from the file name and use that as the text for the Text Layer?

So I would create 365 files:
January 1st.psd
January 2nd.psd etc.. etc...

Or, can I use Automator to open a text file and read each line into a photoshop macro?

I'm just throwing out ideas here, let me know what your thoughts are on this? I've read a few tutorials on how to create copyright text but our situation is different in that we need the text to change each time.

I have created an action set that does all the steps except for the differing text and the positioning.

Thanks very much for any ideas you can come up with, we'd like to have something sorted out in the next couple of days.

Cheers,
Ant
0
Comment
Question by:antum
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
thinkwelldesigns earned 2000 total points
ID: 19617003
Positioning is NOT recorded in Photoshop actions, so this is in script territory here.

I did come across this script from http://photo.net/bboard/q-and-a-fetch-msg?msg_id=004yzL. I don't know if this will help you or not.

( documents.length > 0 ) { /* This script will add copyright information and filename on a text layer */ // set units to pixels var originalRulerUnits = preferences.rulerUnits; preferences.rulerUnits = Units.PIXELS; try { // add art layer var docRef = activeDocument; var artLayerRef = docRef.artLayers.add(); artLayerRef.kind = LayerKind.TEXT; // ============= Personalize your values in the section below ============ // Copyright info var myCopyrightText = "© Anil Mungal 2003 - file: "; // select opacity artLayerRef.opacity = 100; // select the text colour var newColour = new SolidColor(); if (docRef.mode == DocumentMode.CMYK) { newColour.cmyk.cyan = 255; newColour.cmyk.magenta = 255; newColour.cmyk.yellow = 255; newColour.cmyk.black = 0; } if (docRef.mode == DocumentMode.RGB) { newColour.rgb.red = 255; newColour.rgb.green = 255; newColour.rgb.blue = 255; } artLayerRef.textItem.color = newColour; // select the font name artLayerRef.textItem.font = "ArialMT"; // select the font size artLayerRef.textItem.size = 10; // select the text position - this can be an absolute value too, eg. (10,20) artLayerRef.textItem.position = new Array(docRef.width / 2, docRef.height *0.05); // select the text justification artLayerRef.textItem.justification = Justification.CENTER; // ============= Personalize your values in the section above ============ // add text item on the art layer var textItemRef = artLayerRef.textItem; // text contents is copyright info + filename textItemRef.contents = myCopyrightText + docRef.name; // dereference pointers docRef = null; artLayerRef = null; textItemRef = null; myCopyrightText = null; newColour = null; } catch( e ) { // received and error ... throw it back to the user preferences.rulerUnits = originalRulerUnits; throw e; } preferences.rulerUnits = originalRulerUnits; } else { alert( "Open a document first." ); }
0
 

Author Comment

by:antum
ID: 19620761
thinkwelldesigns thanks a bunch for your insight, I'd never heard of Photoshop scripting before so it's something I'm looking into now... it just might solve our problem...

Does anyone know of any other websites that are a good reference for scripting in photoshop?

Thanks,

0
 
LVL 9

Expert Comment

by:thinkwelldesigns
ID: 19629461
Thanks for the grade and points! Hope it helps you.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Why WooCommerce is one of the majorly favored choices when it comes to having an eCommerce store. This article will acquaint you with some reasons that I believe make it one of the best eCommerce platforms available.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question