Copy link to clipboard
Copied
Hi all,
With reference to Silly-V's post (Creating a dynamic action to use with app.doScript() method. ) on the same subject, I'm having an issue where Illustrator does not recognise the dynamically created action as compatible, when trying to load it to the Actions panel.
All the other steps are working fine. The .aia file is being created by the script, the hex code for the dynamic path is being generated via a function written into the script.
I've attached two versions of the Action file:
AI_direct_export.aia - the action as exported from AI before any editing or scripting;
Dynamic_script_created.aia - the dynamically created action
which to my eye there are no visible differences apart from Parameter 11 which is the Hex generated new file path.
I've also attached my script file - PNG_Design.jsx
I've only gone so far as playing the action in AI as I was building the script step-by-step from Silly-V​ instructions.
I'd be grateful for any advice or help on this. These boards have been really valuable for me over the past year so thanks for the help you've unknowingly passed on. Thanks to williamadowling​ for pointing me in this direction and Silly-V​ for the original idea.
Files are here if required: Firefox Send
Ok i've got the action working. In parameter-11, the "value" should be "the number of characters in the hex code divided by two". Replace this block
/parameter-11 {
/key 1231953952
/showInPalette 4294967295
/type (ustring)
/value [ 76
7e2f446f63756d656e74732f6c6f636174696f6e5f746573742f73696d6e746573742e706e67
]
}
With this:
/parameter-11 {
/key 1231953952
/showInPalette 4294967295
/type (ustring)
/value [ 38
7e2f446f63756d656e74732f6c6f636174696f6e5f74657374
...Copy link to clipboard
Copied
I can't get to your files because of my firewall. Can you use dropbox or google drive?
Copy link to clipboard
Copied
Ok i've got the action working. In parameter-11, the "value" should be "the number of characters in the hex code divided by two". Replace this block
/parameter-11 {
/key 1231953952
/showInPalette 4294967295
/type (ustring)
/value [ 76
7e2f446f63756d656e74732f6c6f636174696f6e5f746573742f73696d6e746573742e706e67
]
}
With this:
/parameter-11 {
/key 1231953952
/showInPalette 4294967295
/type (ustring)
/value [ 38
7e2f446f63756d656e74732f6c6f636174696f6e5f746573742f73696d6e746573742e706e67
]
}
And then in your PNG_Design.jsx file, replace this line:
var thisActionString = full.replace("{{hex_encoded_path}}",newpath).replace("{{number_of_characters}}",newpath.length);
with this:
var thisActionString = full.replace("{{hex_encoded_path}}",newpath).replace("{{number_of_characters}}",newpath.length/2);
Copy link to clipboard
Copied
Superb! Thanks William.