1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

help with photoshop scripting?

Discussion in 'Design and Graphics' started by sk3pt1c, Dec 16, 2010.

  1. macrumors 6502a


    a friend asked me to post this.

    What he needs to do is have photoshop open up a text file that contains lines of file names, eg 2039-299434322.jpeg and have it create and save dummy files out of those filenames in a certain folder.
    From what i gathered the purpose is to have the files ready so he can then find the ones he wants to put stuff into and edit them.
    He wants to script this because there will be lots of files to create.

    Any thoughts/ideas?
  2. Moderator emeritus

    I'd probably do it with a combo of Acrobat Pro because it has some OCR capabilities and some Automator chops, combined with Photoshop batch processing. It would take me a while to consult on particularly with Automator, work out and test.

    Think this query goes beyond the scope of the Design and Graphics forum, to be honest as it involves some OS X chops, or even Windows since you haven't even specified what OS your buddy is using.
  3. macrumors 6502a


    i wouldn't post this here if he were using windows :)

    but thanks, i'll try to add Automator into my thinking process :)
  4. Moderator emeritus

    Photoshop on its own will not OCR text. Really, what you're trying to do could skip the imaging stage until the end when you're batch-processing the image files to be psds or whatever.

    Assuming that Photoshop's batch processing tools under File>Automate>Batch will not produce the filenames you need, I'd look at it first of all as a workflow that first needs to parse a text file and produce blank image files in those names, even PDFs could work, the size and format is irrelevant.

    Once that's done, it's a simple matter of setting up a Photoshop action to format those images to the correct dimensions, colour spaces, layers etc and then batch processing all those files into another folder.
  5. macrumors 6502a


    there's no OCR needed here, apologies if i've misled you :/

    @Blue Velvet

    in essence, what needs to be done is the middle part of your post, i want to open a text file, read it off line by line and create a dummy image with the filename of each line.
    photoshop can't generate these filenames because they're not sequential.

    so how could that be achieved? you think automator can do such a thing?
  6. Moderator emeritus


    I'm just a designer, this is the wrong forum for this question although it's been helpful in defining what it is you're trying to achieve. I would create a new thread in the OS X or perhaps the App forum that's specifically to do with the scripting needed to parse your text file and produce new files based on those entries. Once you've got a bunch of files with the correct names that Photoshop can open and batch process to the required format, the rest is a cakewalk.

    PDFs might be valuable in the process because you can natively produce them within OS X from text files and then also open them with Photoshop to convert them to what you need.
  7. macrumors 6502a


    thank you :)

    how could i produce the pdf files?
  8. Moderator emeritus


    Like I said: start a new thread elsewhere that's solely to do with the first part of the process, which is to take a text file, parse and process the entries within it with the appropriate delimiters... in order to produce named blank PDFs, perhaps using individual intermediate text files which you can use Automator to batch convert to PDFs.

    Once that's done, come back to the Design forum if you need a hand with batch processing those PDFs from within Photoshop.
  9. macrumors 6502a


    thanks, done that already, posted it :)

    nah, i'm fine with the batch processing, thanks for your help! :)

Share This Page