0

I have no programming knowledge of JavaScript and following script created by ActionToJavascript:
Main Script
(i can't put here because my script is very long)
Now i want to put following subscripts to above script.

line 82: color_range_2_rectangular_selectionn.jsx
line 391: spl2lay.jsx
line 466: remv_color_range_selection.jsx
line 488: Flip_All_Layers.jsx

please tell me a simple way to replace subscripts into my main script.
Note that i have no programming knowledge of JavaScript and only need a completed sample script to learn this

1
  • 2
    This is, forgive me, asking a lot from "designers". Script editing is more of a programming skill than design skill. This might fit a bit more on stackoverflow.com - I don't know. In general, terms one can often copy/paste scripts into each other to combine processes. However, the skill and knowledge come in where troubleshooting is concerned. One needs to know what functions do and alleviate any conflicts within the combined script. There is often no easy or simple way to combine several javascripts. The more complex the scripts are, the more difficult the challenge becomes.
    – Scott
    Commented Jun 19, 2023 at 15:07

1 Answer 1

0

Your post is a little light on details, and I can't access the links so it's hard to tell if this is helpful, but you can have the main script (created by ActionToJavascript) call your sub-scripts by adding the following code and updating the path. You'd need to update the function name as well:

// Scripts
  function step38(enabled, withDialog) {
    if (enabled != undefined && !enabled)
      return;
    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
    var estr = '//@include "~/[path-to-script]/[script].jsx";\r\n';
    eval(estr);
  };

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.