atn2js ActionFile to Javascript translator

Discussion of the xtools Toolkit

Moderators: Tom, Kukurykus

xbytor

atn2js ActionFile to Javascript translator

Post by xbytor »

There are problems with atn2js on CS. The purely syntactic ones I've addressed and will be out with the next rev.

When I do get it to run, it doesn't appear to stop. I'll have to dive into this over the weekend with the debugger when I've got a good block of time to work on it.
garek007

atn2js ActionFile to Javascript translator

Post by garek007 »

ah yes, how completely idiotic of me. now I see the 'download' link. Should've known that small amount of code couldn't do it alone.
Mike Hale

atn2js ActionFile to Javascript translator

Post by Mike Hale »

X,

I run this on an action that I made basied on Dr. Brown's B&W toner.

About 1/4 of the putEnumerated lines were missing the closing ).

The action is named Toned B&W. I get an error in the first line. If I change "toned B&W = function()" to "tonedB&W = function()" it runs until it hits a step that creates a layer with a space in the name like "tone shadows" Like this line

ref1.putName(PSClass.Layer, Tone shadows);

Are spaces in layer names a problem or am I doing something wrong? It seems to handle spaces

Mike
xbytor

atn2js ActionFile to Javascript translator

Post by xbytor »

The missing spaces and special characters in Action-function names are a known problem. I've fixed it and it should be fine in the next release. There was also a problem with ActionReference.putName where the second parameter should have been in quotes. That's been fixed as well.

I haven't seen the missing putEnumerated problem. unless I fixed it early and forgot about it. Please send me a copy of the offending Action and I'll take a closer look at it.

BTW, how does the code look? I could have done this a lot of different ways but I figured that making Actions functions and ActionItems nested functions would make it easier to restructure and reorganize these things later.

Thanks for the finds.
xbytor

atn2js ActionFile to Javascript translator

Post by xbytor »

More miscellaneous bugs killed. New UI. I've still got some work to do on the UI but it's getting there...

-X
jonnybecker

atn2js ActionFile to Javascript translator

Post by jonnybecker »

Hi,

WinXP, CS2

I'm always getting an error in this script in line 120:
kind[name] = stringIDToTypeID(sym);

Error message:
stringIDToTypeID is no function

Do I have to include some other scripts to get this to work?

Any help appreciated!

Cheers
Jonny