Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

172
Views
Error 1302: No existe tal elemento Línea: 8 groupChildArr[randLays].visible = true;

hola estoy tratando de ejecutar este script que encontre en photoshop y me da este error

1

Se supone que el script hace visible 1 capa aleatoria dentro de cada grupo. Hice lo que decía la publicación paso a paso.

2 Realmente necesito ayuda aqui.

 function Visible() { var Grps = app.activeDocument.layerSets; // loops through all groups for (var i = 0; i < Grps.length; i++) { var tmp = app.activeDocument.layerSets[i].layers.length; app.activeDocument.layerSets[i].visible = true; var groupChildArr = app.activeDocument.layerSets[i].layers; var randLays = Math.floor(Math.random() * tmp); groupChildArr[randLays].visible = true; Save(); } Revert(); } function Save() { var outFolder = app.activeDocument; // psd name var outPath = outFolder.path; var fName = "PNG"; // define folder name var f = new Folder(outPath + "/" + fName); if (!f.exists) { f.create() } var saveFile = new File(outPath + "/" + fName + "/" + "Pattern_" + num + ".png"); pngSaveOptions = new PNGSaveOptions(); pngSaveOptions.interlaced = false; app.activeDocument.saveAs(saveFile, pngSaveOptions, true, Extension.LOWERCASE); } // Original code - revert function does not work // for some users //function Revert(){ // var idslct = charIDToTypeID( "slct" ); // var desc300 = new ActionDescriptor(); // var idnull = charIDToTypeID( "null" ); // var ref163 = new ActionReference(); // var idSnpS = charIDToTypeID( "SnpS" ); // ref163.putName( idSnpS, "test.psd" ); // desc300.putReference( idnull, ref163 ); // executeAction( idslct, desc300, DialogModes.NO ); //} function Revert() { var idRvrt = charIDToTypeID("Rvrt"); executeAction(idRvrt, undefined, DialogModes.NO); } var count = prompt("How many patterns you want", ""); for (var x = 0; x < count; x++) { var num = x + 1; Visible(); }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!