Article View: adobe.photoshop.scripting
Article #1976Re: Need Help Automating Captions in File Info
From: Douglas_P_Hill
Date: Fri, 02 Jul 2004 16:16
Date: Fri, 02 Jul 2004 16:16
18 lines
2296 bytes
2296 bytes
This thread is going in two directions :) Anthony, if you specify whether you're working on a Mac or Windows, and what version of Photoshop you're using, it will help people zero in on potential solutions. Ken, do you also want to merge text into the file info, or do you want to create text layers that will be visible in the image? I'm sure VB or Javascript would both be good choices, given that you intend to have everything ready in text files beforehand. If you needed to read from a database or initiate other programs, VB would have an advantage. I've been programming in Javascript myself. If you want to bring up a dialog to specify which directory to work in, you will need CS (not 7.0) if you want to work in Javascript, as 7.0 had no way to produce this dialog. If you will always be using the same directory, CS and 7.0 should both work with Javascript. I have not tried to delete files using Javascript. Would you be deleting the text files after they were used? You might need to verity that this can be done. Basically, I guess you'd be 1) getting the name of the directory to process (either hard coded or through a dialog) 2) acquiring a directory listing of files matching some extension representing the caption files 3) traversing this list, finding the image files with the same file name (except for extension), opening the image, opening the text file, reading the text, putting it in the file info, saving and closing the image, closing and deleting the text file. Does that sound right? If so, I could suggest Javascripts and code snippets you could look in for those pieces. I may not be able to get to this till July 6, though.
Technical Details
Message-ID:
<3bb4bedf.3@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<3bb4bedf.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f5839,a32d1eb4b0b4e826 X-Google-Attributes: gidf5839,public X-Google-Language: ENGLISH,ASCII-7-bit From: Douglas_P_Hill@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.photoshop.scripting Subject: Re: Need Help Automating Captions in File Info Message-ID: <3bb4bedf.3@webx.la2eafNXanI> Date: Fri, 2 Jul 2004 09:16:26 -0700 References: <3bb4bedf.-1@webx.la2eafNXanI> Lines: 36 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit