• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit Search
0

Batch processing with this script

New Here ,
Feb 22, 2023 Feb 22, 2023

Copy link to clipboard

Copied

I find this script and need to do the batch processing and save the files to a new folder. Please anybody help me. Thanks a lot

function main() {
  var doc = app.activeDocument;
  var layerName = "Cut";
  try {
    var _layer = doc.layers[layerName];
  } catch (e) {
    alert("No layer exists with name " + layerName);
  }
  app.executeMenuCommand("deselectall");
  var _pageItems = doc.pageItems;
  for (var i = 0; i < _pageItems.length; i++) {
    if (
      _pageItems[i].stroked &&
      _pageItems[i].strokeColor.red == 255 &&
      _pageItems[i].strokeColor.blue == 0 &&
      _pageItems[i].strokeColor.green == 0
    ) {
      _pageItems.selected = true;
      break;
    }
  }
  app.executeMenuCommand("Find Stroke Color menu item");
  var _allItems = app.selection;
  for (var i = 0; i < _allItems.length; i++) {
    _allItems[i].move(_layer, ElementPlacement.PLACEATEND);
  }
}

main();

 

TOPICS
Scripting

Views

156

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation