Copy link to clipboard
Copied
Is there a script or line of code that can select a layer when opening a document (every document we open)?
app.addEventListener( "afterOpen", doSl );
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Selects test when opening document <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\\
function doSl(){
app.activeDocument.layers.item("Test").select = true;
}
A Layer doesn’t have a select property, so I think you want to set the document’s activeLayer. Try:
app.activeDocument.activeLayer = "Test";
Copy link to clipboard
Copied
A Layer doesn’t have a select property, so I think you want to set the document’s activeLayer. Try:
app.activeDocument.activeLayer = "Test";
Copy link to clipboard
Copied
I was trying to make it far to difficult. This worked perfect thanks a ton. 🙂
Copy link to clipboard
Copied
You can place this script in the startup folder and it shall automatically run at the startup. Some additions to be added into this would be to add a #targetengine at the top of the script.
-Manan