Solved

Scripting photoshop to run specific actions based on folder names

Posted on 2004-09-10
5
273 Views
Last Modified: 2010-04-03
I have a project that requires me to add logos to my files.  I have 51 logos - one for each state and one for the US.  the specific logo for an image is based on which folder I have it in.  I have created an action that resizes to a specific format and adds the logo by opening it then a copy and paste.  Since the logo is part of the action - I need to run 51 variations of this action on a daily basis.  I am looking for a way to automate it further by having photoshop process all of the images in a main folder by the names on the subfolders - (ie running the Alaska action on all files in subfolder AK....).  is this possible and if so how?

Thought about doing it via JavaScript but since I have never programmed Java I would be starting from scratch and not sure if that is the best way to go.
0
Comment
Question by:dspangenberg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 30

Expert Comment

by:weed
ID: 12031778
On a Mac? Applescript is 100x easier than trying to do it in javascript.
0
 
LVL 3

Accepted Solution

by:
mmiika earned 500 total points
ID: 12865283
If you are doing it on windows you can use either vbscript or javascript. I think if you have no experience vbscript could be easier...

You can download the reference and a scripting guide from http://partners.adobe.com/public/developer/photoshop/sdk/index_scripting.html

There's also http://www.adobeforums.com/ where you should join, you can find some example scripts from there as well.

Check also http://www.mojombo.com/archives/000029.html

If you have already done specific actions for specific folders, maybe you don't even need to do scripting, you can also Batch run actions.
(foolowing for CS, don't remember if same on earlier versions)
1) Select File > automate > Batch.
2) Play... select your action set a and the action you wanna run
3) Source: select Folder and click Choose
4) Destination: If it's ok to overwrite your images select "Save and Close", otherwise select "Folder"

Then just click ok...


Hope this helps


0
 
LVL 3

Expert Comment

by:mmiika
ID: 12865418
Oh yes, and pre prepared, the scripting guide and reference Adobe offers are quite cryptic...

To get started here's a little script, replace ActionaName with name of your action and ActionSet with the name of the set that action is in.:

Dim myPhotoShop
Set myPhotoShop = CreateObject("Photoshop.Application")
myPhotoShop.doAction ActionName, ActionSet

1) Copy the above to a text file and save for example as "PhotoShopScriptTest.vbs"
2) open photoshop and the file you want to run action in (this can be automated as well..., but now for simplicity...)
3) double click on the "PhotoShopScriptTest.vbs" (run it)

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction When sharing photos, especially via e-mail, the large resolution images that most cameras take today make for extremely large file sizes. The time required to upload these files to forums, send in e-mails, post to blogs or even placi…
Read about why website design really matters in today's demanding market.
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to correct colors in Photoshop using the Levels adjustment Open a photo for editing in Photoshop: Begin by creating a new adjustment layer by going to Layer > New Adjustment Layer > Levels: Select "OK" on the …

751 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