Created
October 13, 2022 21:33
-
-
Save justintaylor-dev/be39e3bb563cdb0b976cea9c7497c1cc to your computer and use it in GitHub Desktop.
Letters to Layers #code_aeft
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 rename(word) { | |
var array = app.project.activeItem.selectedLayers; | |
for (var i = 0; i < array.length; i++) { | |
var layer = array[i]; | |
if(word[i]){ | |
layer.name = word[i]; | |
} | |
} | |
} | |
var dialog = new Window("window"); | |
dialog.text = "Letters To Layers"; | |
dialog.orientation = "column"; | |
dialog.alignChildren = ["center","top"]; | |
dialog.spacing = 10; | |
dialog.margins = 16; | |
var edittext1 = dialog.add('edittext {properties: {name: "edittext1"}}'); | |
edittext1.preferredSize.width = 300; | |
var button1 = dialog.add("button", undefined, undefined, {name: "button1"}); | |
button1.text = "Rename"; | |
button1.onClick = function(){ | |
rename(edittext1.text); | |
} | |
dialog.show(); |
Author
justintaylor-dev
commented
Oct 13, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment