Looking for specific script AND recommendation

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

thechrisboggs

Looking for specific script AND recommendation

Post by thechrisboggs »

Hi Scripters,

I'm looking for a script that uses conditional logic to determine whether height or width is greater and then assigns a value to it.

I have to convert zillions of images from thier 300DPI TIF sources to 72DPI jpegs whose longest dimension attribute(either width OR height) is changed to 180 pixels for my websites.

My desire is to learn it through reverse-engineering the script so that I can write many more scripts of similar intent and focus.

Also or and, does anyone know of a good tute that teaches how one would approach writing such a script? I knew a newby to PS scripting but have been writing good solid medium complexity scripts in Flash Action Script for some time and I aint skeered.

Thanks in advance for any help/suggestions.

Sincerely,
Chris Boggs
Larry Ligon

Looking for specific script AND recommendation

Post by Larry Ligon »

Chris,
The scripting is different for each of the last 3 versions of Photoshop. What version of Photoshop are you using?

Are you planning to use JavaScript to write your scripts?

Larry
thechrisboggs

Looking for specific script AND recommendation

Post by thechrisboggs »

Thanks for pointing out my basic omissions Larry. Sorry.

Photoshop 7.0

Planning on using JS for multi platform and familiarity advantages.

Oops, -c-
Larry Ligon

Looking for specific script AND recommendation

Post by Larry Ligon »

Here is a Photoshop 7 script that I wrote:
http://ps-scripts.com/bb/viewtopic.php?t=28

The Photoshop7 Javascript doesn't have any user interface functions. You can't ask the user to select a folder containing your images. You can use activeDocument.path to find out the current folder for the currently opened image.

The activeDocument.height and activeDocument.width tell you what the current document height and width is. Take a look at the resizeImage function. Take a look at the Javascript Folder.getFiles() function.

Take a look at the documentation that comes with the scripting:
JavaScript Reference.pdf
JavaScript File Object.pdf

Check out these web sites:
http://www.croczilla.com/~alex/referenc ... index.html ... index.html
http://www.croczilla.com/~alex/referenc ... index.html ... index.html
http://www.caucho.com/resin/jsref/corelib.xtp
http://www.synchro.net/docs/jsobjs.html#File

After you've played around with the scripting you can ask specific questions here.

Larry