Hello everyone!
After some search on the forums about Adobe Photoshop scripting I found that there is a problem of exporting "Use brush" (Brush Stroke) action to the JavaScript file.
I tried on myself ActionFileToXML.jsx and ActionFileToJavascript.jsx from http://ps-scripts.sourceforge.net/xtools.html after recording some brush strokes via Action Palette, and Photoshop became "frozen".
(When I used "Fill" tool without any brush strokes - saved action file converted without problem)
I also tried Convert Actions File from http://www.tonton-pixel.com/scripts/utility-scripts/convert-actions-file/index.html . Result was the same.
Without recording brush strokes .atn action file converts without problem, but if I try to export action file with recorded brush strokes application becomes "frozen".
I tried to open converted files in the destination folder in hope that they will have brush strokes actions converted to the script - but there was FAIL. This did not happen.
-----
I did some research of this theme and found that .atn files can be viewed via Freeware Hex Editor XVI32 from http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm
And I found that simple action file with commands Set Foreground Color (red) - Fill
![im002.JPG]()
will become this:
![im001.JPG]()
And another simple action file with commands Set Foreground Color (red) - Fill - Set Foreground Color (yellow) - Select brush - Set current brush - Use brush
![im003.JPG]()
will become this:
![im004.JPG]()
Please, pay your attention to the right scrollbar, file is really huge.
Action Set - No Brush.atn takes only 1 KB, and Action Set - Brush.atn - 7 423 KB.
I make assumption that this big data is about speed of drawing of the line, pressure of the pen on the tablet, direction of the drawing in each millisecond and so on.
So my question - how to decode this data into the JavaScript? Maybe someone from you, dear users, knows how to operate with such low-level data for further scripting.
In fact, Photoshop somehow understands .atn files and can play "Use brush" commands. So, the solution really exists!
Could you help me, please?