0
including rather complex path objects in javascript
Community Expert
,
/t5/photoshop-ecosystem-discussions/including-rather-complex-path-objects-in-javascript/td-p/1096846
Jan 28, 2009
Jan 28, 2009
Copy link to clipboard
Copied
When passing data-CDs or -DVDs on to customers I like to provide a cover containing a screenshot of the content in list-form (so that the change-dates can be verified) with background, logo, date and some graphic elements added.
Which works fine as an Action (with some small Scripts recorded in).
But what with Configurators capability to include Scripts I would like to move the whole thing into JavaScript so as to be able to pass a Configurator-Panel on to colleagues without them having to install separate Actions as well.
Therefore Im looking for a way to include the generation of a relatively complex path (several hundred points, multiple subPathItems) for an illustrative logo-element in the Script.
I may be trying to use the less fitting mechanism in looking for a way to do with a Script what an Action can achieve so effortlessly with »Insert Path«, but could any of You tell me a way to get all the necessary info from an existing path into Script-form?
Or would You advise me to simply desist from the intention for Script-length-reasons/other considerations?
Which works fine as an Action (with some small Scripts recorded in).
But what with Configurators capability to include Scripts I would like to move the whole thing into JavaScript so as to be able to pass a Configurator-Panel on to colleagues without them having to install separate Actions as well.
Therefore Im looking for a way to include the generation of a relatively complex path (several hundred points, multiple subPathItems) for an illustrative logo-element in the Script.
I may be trying to use the less fitting mechanism in looking for a way to do with a Script what an Action can achieve so effortlessly with »Insert Path«, but could any of You tell me a way to get all the necessary info from an existing path into Script-form?
Or would You advise me to simply desist from the intention for Script-length-reasons/other considerations?
TOPICS
Actions and scripting
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explore related tutorials & articles
Explorer
,
/t5/photoshop-ecosystem-discussions/including-rather-complex-path-objects-in-javascript/m-p/1096847#M447773
Jan 28, 2009
Jan 28, 2009
Copy link to clipboard
Copied
You could just convert your actions to scripts...
http://ps-scripts.cvs.sourceforge.net/viewvc/*checkout*/ps-scripts/xtools/apps/ActionFileToJavascript.jsx
http://ps-scripts.cvs.sourceforge.net/viewvc/*checkout*/ps-scripts/xtools/apps/ActionToJavascript.jsx
Let me know if you run into any problems with the scripts.
-X
http://ps-scripts.cvs.sourceforge.net/viewvc/*checkout*/ps-scripts/xtools/apps/ActionFileToJavascript.jsx
http://ps-scripts.cvs.sourceforge.net/viewvc/*checkout*/ps-scripts/xtools/apps/ActionToJavascript.jsx
Let me know if you run into any problems with the scripts.
-X
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
c.pfaffenbichler
AUTHOR
Community Expert
,
/t5/photoshop-ecosystem-discussions/including-rather-complex-path-objects-in-javascript/m-p/1096848#M447774
Jan 28, 2009
Jan 28, 2009
Copy link to clipboard
Copied
Thanks for the quick reply!
I will try that.
I will try that.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
c.pfaffenbichler
AUTHOR
Community Expert
,
/t5/photoshop-ecosystem-discussions/including-rather-complex-path-objects-in-javascript/m-p/1096849#M447775
Jan 28, 2009
Jan 28, 2009
Copy link to clipboard
Copied
Ive tried it with ActionFileToJavascript.jsx, but so far I havent gotten far.
»Error 25: Expected: (.« I can avoid by removing »1« between »function« and »() {« in line 8, but »Error 2: _main is undefined« has me baffled (Refers to the line »_main.loadSymbols = function () {»). That seems to happen on invoking in Photoshop.
But trying from ESTK I get »Cannot execute Script. (Target Photoshop CS4 provides no engine for debugging.)«.
Could You tell me how I can avoid that?
Im working on Photoshop 11.0 on May OS X 10.4.11 by the way.
»Error 25: Expected: (.« I can avoid by removing »1« between »function« and »() {« in line 8, but »Error 2: _main is undefined« has me baffled (Refers to the line »_main.loadSymbols = function () {»). That seems to happen on invoking in Photoshop.
But trying from ESTK I get »Cannot execute Script. (Target Photoshop CS4 provides no engine for debugging.)«.
Could You tell me how I can avoid that?
Im working on Photoshop 11.0 on May OS X 10.4.11 by the way.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
c.pfaffenbichler
AUTHOR
Community Expert
,
/t5/photoshop-ecosystem-discussions/including-rather-complex-path-objects-in-javascript/m-p/1096850#M447776
Jan 28, 2009
Jan 28, 2009
Copy link to clipboard
Copied
Ups »1« was the name of my Action which as the name for the function seems to be inaproproate as its mistaken for a number.
»_main is undefined« on the other hand still eludes me, but I can run the Script from ESTK.
»_main is undefined« on the other hand still eludes me, but I can run the Script from ESTK.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
c.pfaffenbichler
AUTHOR
Community Expert
,
/t5/photoshop-ecosystem-discussions/including-rather-complex-path-objects-in-javascript/m-p/1096851#M447777
Jan 28, 2009
Jan 28, 2009
Copy link to clipboard
Copied
Sorry, Ive redone it with »ActionToJavascript.jsx« and the resulting jsx works fine.
Thanks, xbytor!
Thanks, xbytor!
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explorer
,
/t5/photoshop-ecosystem-discussions/including-rather-complex-path-objects-in-javascript/m-p/1096852#M447778
Jan 28, 2009
Jan 28, 2009
Copy link to clipboard
Copied
> Sorry, Ive redone it with »ActionToJavascript.jsx« and the resulting jsx works fine.
Good to hear.
-X
Good to hear.
-X
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
c.pfaffenbichler
AUTHOR
Community Expert
,
LATEST
/t5/photoshop-ecosystem-discussions/including-rather-complex-path-objects-in-javascript/m-p/1096853#M447779
Jan 29, 2009
Jan 29, 2009
Copy link to clipboard
Copied
Compliments on a great and greatly useful script!
Thanks,
pfaffenbichler
Thanks,
pfaffenbichler
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

