ActionToJavascript tool

Upload Area - Upload Files Here, link to them from the appropriate Forum

Moderators: Tom, Kukurykus

hellotherebigdave

ActionToJavascript tool

Post by hellotherebigdave »

Hi Xbytor,

here is the action and outputted script. As I say, there is certainly a healthy amount of script, but it may well be that it is just the way that I'm interpreting it (or not),


the tool seems incredibly useful, I could just do with uinderstanding how it actually works!
xbytor

ActionToJavascript tool

Post by xbytor »

Thanks for this. Can you also post up a sample PSD? I'd like to do my testing on something 'real'.

I've found one problem already, but I need a test case to verify that everything else is OK.

-X
hellotherebigdave

ActionToJavascript tool

Post by hellotherebigdave »

Hi,
here is a zipped version of a file that I might be working with.

To test the action, you will have to create an alpha channel in the image (due to upload restrictions, I can't make one) I have included an alpha of the monkeys as a separate jpeg.

I would normally be working with targas or psds, but, as you can see, they're pretty large files. My reason for having this as a script is so that it can automatically detect whether an alpha channel is present or not, running a modified command accordingly.

Thanks for your help,
Dave.
xbytor

ActionToJavascript tool

Post by xbytor »

There were a couple of bugs related to ActionLists, ActionReferences, and keys. Those have been fixed.

I've attached a zip with three files:
1) newanamorphicalpha.jsx - This is the generated JS code for your action.

2) ActionToJavascript.jsx - This is the toplevel UI code for the translator. It needs include files.

3) ActionToJavascriptF.jsx - This is the flattened standalone version of ActionToJavascript.jsx.

There is a new UI to the translator. The simplest thing to do is to select your action file and hit 'Process'. It will generate executable scripts for each action that it finds in the action file, which is normally what you want. These scripts will be place in the same directory as the action file.

There was one change that I needed to make to your action. The first step in your action is 'Make snapshot'. It is one of those odd action steps that may require a Dialog but does not mark it as requiring a Dialog. I clicked the little Dialog marker on, save the action file, and the code is generated correctly.

You could also manually modify the script by changing the line
Code: Select all     step1(true, false); to Code: Select all     step1(true, true);

Thanks for helping me isolate the problems. Testing these kinds of translator is a pain, so I rely on users to supplement my own testing.

-X
hellotherebigdave

ActionToJavascript tool

Post by hellotherebigdave »

Thankyou Xbytor!

This is the most astoundingly useful script I've come across, especially for someone new to / lazy about scripting like me - it is a beautiful way of getting a big mess of actions into something more useable. And the code inside is now so neatly organised, no chance of getting lost.

I really appreciate the effort u've gone to in helping me out, I think I understand the final script enough to tinker now, and the new interface makes things a lot clearer.

I hope Adobe are thinking about paying you vast sums of money for this!

Cheers,
BigDave
xbytor

ActionToJavascript tool

Post by xbytor »

Has anyone run into any problems with this? I am starting final cleanup on xtools for a new release and would like to get any feedback on the current version.

thanx,
-X