Skip to main content
Participant
July 11, 2012
Pergunta

Script for Selecting Open Paths in Illustrator CS6

  • July 11, 2012
  • 1 resposta
  • 17841 Visualizações

I have created this script for selecting open paths in illustrator cs6 as the graffix plugin is not working under CS6.

Just save the following text in /Applications/Adobe Illustrator CS6/Presets/en_US/Scripts/Select Open Paths.js

if (documents.length > 0 && activeDocument.pathItems.length > 0){
 
          var allPaths = activeDocument.pathItems;
          var allPathsCount = allPaths.length;
          var openPathsAreLocked = false;
          var lockedOpenPaths = 0;
          var locked = false;
          for (var i=0; i < allPathsCount; i++){
                    allPaths[ i ].selected = false;
 
                    if( ! allPaths[ i ].closed){
 
                              try{
                                        allPaths[ i ].selected = true;
                              } catch (e) {
                                        openPathsAreLocked = true;
                                        lockedOpenPaths++;
                              }
 
                    }
          }
          if (openPathsAreLocked) alert (lockedOpenPaths + " open paths are locked or hidden (or their layer is locked or hidden) and cannot be selected");
}
Este tópico foi fechado para respostas.

1 Resposta

Known Participant
August 3, 2012

How do you do this on a mac? Or maybe I should say, what app should I use to create this? The Text Edit App won't let me save this  file. I can change the extension afterwords but no go.

Larry G. Schneider
Community Expert
Community Expert
August 3, 2012

Copy the above and paste into the text editor of your choice. Force the text to plain text (not RTF; in TextEdit use as below). Save it as above.

Known Participant
August 3, 2012

So it needs to be a txt extension, not js?