Hi,

I'm very new to using javascript to program Photoshop, and was looking for some help with changing the variables in an action.

The basic end result I'm looking for (in laymens terms) is:

Set variables
Perform action
Change variables (iteratively, ie a=a+1)
Repeat until condition met (ie, after 100 iterations, the script would end).

I used a script that converts Photoshop actions to Javascript, so I have this as a base:

Code:
 function step1(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var desc1 = new ActionDescriptor();
    desc1.putInteger(cTID('0001'), 215);
    desc1.putInteger(cTID('0002'), 172);
etc etc (goes through many other variables)
    executeAction(sTID('Flaming Pear'), desc1,
I've put the properties that would need to become variables in red. I have edited out a bunch of lines in this post as these seem to be the significant ones in terms of what I need to do (obviously keeping them in the script itself!).

Other than that I think that's all I need to know for now - just that little thing would enhance my workflow no end.

Also, I'm a graphic designer so if anyone would be interested in doing some skillshare or work swap - I'd be happy to provide help and service with graphics in exchange for small tidbits about javascript.

Cheers,
Jonathan