I've used a script listener to record the action but once copied across I can't get it to work, I get the error Functionality may not be available. line 63 What could be the issue? Or is the another workaround to getting the object to have an "auto"path? The image is in 3 layers Main Image BACKGROUND Original Image (invisible) #target "photoshop" // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc77 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref37 = new ActionReference(); var idmagicWandTool = stringIDToTypeID( "magicWandTool" ); ref37.putClass( idmagicWandTool ); desc77.putReference( idnull, ref37 ); var iddontRecord = stringIDToTypeID( "dontRecord" ); desc77.putBoolean( iddontRecord, true ); var idforceNotify = stringIDToTypeID( "forceNotify" ); desc77.putBoolean( idforceNotify, true ); executeAction( idslct, desc77, DialogModes.NO ); // ======================================================= var idsetd = charIDToTypeID( "setd" ); var desc78 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref38 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idfsel = charIDToTypeID( "fsel" ); ref38.putProperty( idChnl, idfsel ); desc78.putReference( idnull, ref38 ); var idT = charIDToTypeID( "T " ); var desc79 = new ActionDescriptor(); var idHrzn = charIDToTypeID( "Hrzn" ); var idPxl = charIDToTypeID( "#Pxl" ); desc79.putUnitDouble( idHrzn, idPxl, 17.000000 ); var idVrtc = charIDToTypeID( "Vrtc" ); var idPxl = charIDToTypeID( "#Pxl" ); desc79.putUnitDouble( idVrtc, idPxl, 17.000000 ); var idPnt = charIDToTypeID( "Pnt " ); desc78.putObject( idT, idPnt, desc79 ); var idTlrn = charIDToTypeID( "Tlrn" ); desc78.putInteger( idTlrn, 2 ); var idMrgd = charIDToTypeID( "Mrgd" ); desc78.putBoolean( idMrgd, true ); var idAntA = charIDToTypeID( "AntA" ); desc78.putBoolean( idAntA, true ); executeAction( idsetd, desc78, DialogModes.NO ); // ======================================================= var idInvs = charIDToTypeID( "Invs" ); executeAction( idInvs, undefined, DialogModes.NO ); // ======================================================= var idmodalStateChanged = stringIDToTypeID( "modalStateChanged" ); var desc80 = new ActionDescriptor(); var idLvl = charIDToTypeID( "Lvl " ); desc80.putInteger( idLvl, 1 ); var idStte = charIDToTypeID( "Stte" ); var idStte = charIDToTypeID( "Stte" ); var identer = stringIDToTypeID( "enter" ); desc80.putEnumerated( idStte, idStte, identer ); var idkcanDispatchWhileModal = stringIDToTypeID( "kcanDispatchWhileModal" ); desc80.putBoolean( idkcanDispatchWhileModal, true ); executeAction( idmodalStateChanged, desc80, DialogModes.NO ); // ======================================================= var idmodalStateChanged = stringIDToTypeID( "modalStateChanged" ); var desc81 = new ActionDescriptor(); var idLvl = charIDToTypeID( "Lvl " ); desc81.putInteger( idLvl, 0 ); var idStte = charIDToTypeID( "Stte" ); var idStte = charIDToTypeID( "Stte" ); var idexit = stringIDToTypeID( "exit" ); desc81.putEnumerated( idStte, idStte, idexit ); var idkcanDispatchWhileModal = stringIDToTypeID( "kcanDispatchWhileModal" ); desc81.putBoolean( idkcanDispatchWhileModal, true ); executeAction( idmodalStateChanged, desc81, DialogModes.NO ); // ======================================================= var idMk = charIDToTypeID( "Mk " ); var desc82 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref39 = new ActionReference(); var idPath = charIDToTypeID( "Path" ); ref39.putClass( idPath ); desc82.putReference( idnull, ref39 ); var idFrom = charIDToTypeID( "From" ); var ref40 = new ActionReference(); var idcsel = charIDToTypeID( "csel" ); var idfsel = charIDToTypeID( "fsel" ); ref40.putProperty( idcsel, idfsel ); desc82.putReference( idFrom, ref40 ); var idTlrn = charIDToTypeID( "Tlrn" ); var idPxl = charIDToTypeID( "#Pxl" ); desc82.putUnitDouble( idTlrn, idPxl, 0.500000 ); executeAction( idMk, desc82, DialogModes.NO );
... View more