I have just started playing with Alchemist, what a great tool to capture Photoshop events, provide batchPlay code and inspect DOM. One thing I haven’t figured out yet how to capture the events generated by running extended script. E.g. I have a test.jsx file with the following code:
var layers = app.activeDocument.artLayers;
var layer = layers.add();
layer.kind = LayerKind.TEXT;
layer.name = "MyTextLayer";
this creates an empty layer of type TEXT. If I run this script from Adobe’s ExtendScriptToolkit Alchemist doesn’t capture anything. If I run the script from Photoshop->Scripts, Alchemist captures the fact that the jsx file was run, but not the details of each command within that script. Here’s what Alchemist captures:
{
"_obj": "AdobeScriptAutomation Scripts",
"javaScript": {
"_path": "D:\\Documents\\Adobe Scripts\\test.jsx",
"_kind": "local"
},
"javaScriptMessage": "undefined",
"_isCommand": true
}
Is there a way to capture the individual events within my jsx script file so that I could get Alchemist show something along these lines:
{
"_obj": "make",
"_target":
[
{
"_ref":"layer"
}
],
"using":
{
"_obj": "layer",
"name": "MyTextLayer",
"layerKind": 3
},
"_isCommand": true,
"_options":
{
"dialogOptions": "dontDisplay"
}
}
Note, the descriptor code above successfully creates a layer, just not a text layer - something I’m trying to solve via another thread on this forum.
Ultimately I’m trying to figure out if there’s an easy way to translate some of my old extended script jsx files to batchPlay scripts by simply replaying them (or snippets of them) and observing the new json format for batchPlay.
Thank you.