Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Adding Current date to smart object template as text

New Here ,
Jul 07, 2008 Jul 07, 2008
Hello, I recently learned about smart objects, and my wife and I created a smart object for our daily photoblog (every day we have a new picture for the day, surrounded by a black frame with the date in white text on the bottom). Now all we have to format our pictures correctly is resize them, replace the object in the template with the new picture, and then re-do the text. What I was wondering is whether or not we could remove that last step by scripting Photoshop to insert the current date into a standardly formatted text field. Any help would be greatly appreciated!!
TOPICS
Actions and scripting
469
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Jul 09, 2008 Jul 09, 2008
In the Exchange there used to be a Script available that added filename and date as a type layer, You probably can get he relevant part out of that:
http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=1044198
Im not very experienced in Scripting myself but I think You should be able to include the resize and the creation of a black border into the script too.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 10, 2008 Jul 10, 2008
LATEST
Assuming the name of the text layer is 'Filename Layer', this should work:

function main() {
if (app.documents.length == 0) {
return;
}
var doc = app.activeDocument;
var fnameLayer = doc.layers.getByName("Filename Layer");
fnameLayer.textItem.contents = doc.name;
};
main();

--
for photoshop scripting solutions of all sorts
contact: xbytor@gmail.com
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines