Created
April 25, 2012 13:10
-
-
Save hilukasz/2489599 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 getDivWidthHeight() { | |
var divNumber = doc.pathItems.length; | |
var divHeightWidth = []; | |
for (i = 0; i < divNumber; i++){ | |
if ( app.documents.length > 0 ) { | |
var itemWidth = doc.pathItems[i].width; | |
var itemHeight = doc.pathItems[i].height; | |
var currentLayerName = getLayerName(i); | |
divHeightWidth.push(currentLayerName, itemWidth, itemHeight); | |
} | |
} | |
} | |
var allLayersIndex = layers.length; | |
for (i = 0; i < allLayersIndex; i++) { | |
var customName = "Layer 2"; | |
var myLayer = app.activeDocument.layers[i]; | |
var myLayer = myLayer.name; | |
if (customName == myLayer) { | |
//getDivWidthHeight(); | |
var currentLayerName = getLayerName(i); | |
alert("match on:" + currentLayerName); | |
} | |
else { break; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment