Created
May 1, 2012 20:13
-
-
Save hilukasz/2571031 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function all() { | |
var doc = app.activeDocument; | |
var itemsToLoop = [doc.layers, doc.symbolItems]; | |
var arrayItems = []; | |
for( i = 0; i < itemsToLoop.length; i++) { | |
var itemName[i] = itemsToLoop[i].name; | |
arrayItems.push(itemName[i]); | |
} | |
this.numberOfItems = itemCollect; | |
} | |
all.prototype.findAndReplace = function(this.arrayItems) { | |
var findTextInSymbolName = prompt("Text to find", ""); | |
var replaceTextInSymbolName = prompt("Text to replace", ""); | |
for( i = 0; i < app.activeDocument.symbolItems; i++){ | |
var currentSymbolName = app.activeDocument.symbolItems[i].symbol.name; | |
if (currentSymbolName == findTextInSymbolName) { | |
return currentObjectName = replaceTextInSymbolName; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment