Thread View: adobe.photoshop.scripting
16 messages
16 total messages
Started by Brandon_Lindquist
Mon, 23 Mar 2009 20:01
Script to edit actual text in type layer with number generation?
Author: Brandon_Lindquist
Date: Mon, 23 Mar 2009 20:01
Date: Mon, 23 Mar 2009 20:01
7 lines
1418 bytes
1418 bytes
Excuse me if this is a dumb question, is there a way to write a script that will edit the actual text in a Type layer? For example, I have to create a few hundred slates. Each one has a year and an issue number. There are only 17 years I have to do, but hundreds of issues. I would like to create just a template for each year and run a script that creates a slate with a different issue number for each. They would run 001 to 100, for example. Basically I would need to script something that opens a document, opens the type layer for editing and generates a number (counting 001 to ###), then repeats with a continuing number in each document. Thanks for any advice you can give, or if you know of a script in existence that may be able to help me!
Re: Script to edit actual text in type layer with number generation?
Author: christoph_pfaffenbichler
Date: Tue, 24 Mar 2009 12:03
Date: Tue, 24 Mar 2009 12:03
2 lines
1001 bytes
1001 bytes
That sound achievable, but when automating stuff a lot depends on regularity across the objects to be manipulated � is there only ever one TypeLayer in the documents, is it always in the same position (topmost for example) in the stack? What format would You want to save the resulting hundreds of files in? Do You want to keep the layered files or just save flattened jpgs?
Re: Script to edit actual text in type layer with number generation?
Author: Brandon_Lindquist
Date: Tue, 24 Mar 2009 17:39
Date: Tue, 24 Mar 2009 17:39
7 lines
1149 bytes
1149 bytes
Thanks for your response! Each slate would be exactly the same except for the number, and I'm pretty much open to whatever would be easiest. I would imagine that the layer I want to edit would be on the top and be just "###" for text. It would always in the same position, then one or two layers below it would have other text, but would not be edited. As far as output format, it doesn't really matter. .psd would be fine. I could always use the image processor if I needed to. I'm on CS3 by the way.
Re: Script to edit actual text in type layer with number generation?
Author: Wide_Eyed_Pupil
Date: Thu, 26 Mar 2009 12:29
Date: Thu, 26 Mar 2009 12:29
1 lines
740 bytes
740 bytes
This looks like JS or is it VB (I'm on Mac and pretty new to scripting)
Re: Script to edit actual text in type layer with number generation?
Author: christoph_pfaffenbichler
Date: Thu, 26 Mar 2009 12:56
Date: Thu, 26 Mar 2009 12:56
1 lines
861 bytes
861 bytes
It�s JavaScript, just copy it into a new File in ExtendScript Toolkit and save it into the Presets � Scripts-Folder in Photoshop�s program-folder.
Re: Script to edit actual text in type layer with number generation?
Author: Wide_Eyed_Pupil
Date: Thu, 26 Mar 2009 13:17
Date: Thu, 26 Mar 2009 13:17
1 lines
713 bytes
713 bytes
Oh sorry just editted as you were answering previous question . I'm working with script now.
Re: Script to edit actual text in type layer with number generation?
Author: Wide_Eyed_Pupil
Date: Thu, 26 Mar 2009 13:19
Date: Thu, 26 Mar 2009 13:19
1 lines
722 bytes
722 bytes
So just to repeat myself, jpopts var being ignored in script. I event set it to 1 and same file size.
Re: Script to edit actual text in type layer with number generation?
Author: christoph_pfaffenbichler
Date: Thu, 26 Mar 2009 13:33
Date: Thu, 26 Mar 2009 13:33
2 lines
972 bytes
972 bytes
In case You edited the Script, please go over it and make sure that the variable-name is always written exactly the same; other than that I wouldn�t know how it could happen that the settings get ignored. Or maybe, if the file is really small in pixel-dimensions, the size depends more on the embedded profile �
Re: Script to edit actual text in type layer with number generation?
Author: Wide_Eyed_Pupil
Date: Thu, 26 Mar 2009 13:35
Date: Thu, 26 Mar 2009 13:35
1 lines
788 bytes
788 bytes
Well further examination shows image is showing jpeg deteriation but file size is still 60K as is full quality. Batching save for web at quality=9 got them down to 4K.
Re: Script to edit actual text in type layer with number generation?
Author: Wide_Eyed_Pupil
Date: Thu, 26 Mar 2009 13:37
Date: Thu, 26 Mar 2009 13:37
1 lines
713 bytes
713 bytes
Yes must be "save for web" removes the profile as opposed to regular save.
Re: Script to edit actual text in type layer with number generation?
Author: Wide_Eyed_Pupil
Date: Thu, 26 Mar 2009 13:39
Date: Thu, 26 Mar 2009 13:39
7 lines
841 bytes
841 bytes
Actually I just checked the script and I had changed line 29 to: jpgopts.embedProfile = false; so can't be the profile. Anyhow I've got the result I wanted. Thanks for the script!
Re: Script to edit actual text in type layer with number generation?
Author: Michael_L_Hale
Date: Thu, 26 Mar 2009 14:29
Date: Thu, 26 Mar 2009 14:29
3 lines
855 bytes
855 bytes
The problem is the metadata not the profile. The profile is saved as a string ie 'Adobe RGB'. The metadata adds about 32k to a file. Save for web removes the metadata and has an option for the profile
Re: Script to edit actual text in type layer with number generation?
Author: christoph_pfaffenbichler
Date: Thu, 26 Mar 2009 14:45
Date: Thu, 26 Mar 2009 14:45
1 lines
839 bytes
839 bytes
WEP, instead of batching after the fact You could try including the Save For Web in the Script � �Photoshop CS4 JavaScript Ref.pdf� should contain all the necessary information.
Re: Script to edit actual text in type layer with number generation?
Author: Wide_Eyed_Pupil
Date: Thu, 26 Mar 2009 16:26
Date: Thu, 26 Mar 2009 16:26
1 lines
711 bytes
711 bytes
Yes, good idea. I'm on CS3 but this command should be supported I guess.
Re: Script to edit actual text in type layer with number generation?
Author: xbytor
Date: Thu, 26 Mar 2009 17:02
Date: Thu, 26 Mar 2009 17:02
4 lines
948 bytes
948 bytes
Wide_Eyed_Pupil@adobeforums.com wrote: > Yes, good idea. I'm on CS3 but this command should be supported I guess. Document.exportDocument takes ExportOptionsSaveForWeb as an argument.
Re: Script to edit actual text in type layer with number generation?
Author: Wide_Eyed_Pupil
Date: Fri, 27 Mar 2009 03:37
Date: Fri, 27 Mar 2009 03:37
3 lines
882 bytes
882 bytes
I want to extend this script to concatenate the numbered images into a horizontal filmstrip type of image containing all of them (say 40 to 1 in left to right order). I started a new thread as it seemed sensible. <http://www.adobeforums.com/webx/.59b86c81>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads