private string Get_Layer_Name(int index) { Photoshop.ActionReference act = new Photoshop.ActionReference(); act.PutIndex(app.CharIDToTypeID("Lyr "), index+1); return app.ExecuteActionGet(act).GetString(app.CharIDToTypeID("Nm ")); }
private void Isolate_Selection() { var idShw = app.CharIDToTypeID("Shw "); var desc68 = new ps.ActionDescriptor(); var idnull = app.CharIDToTypeID("null"); var list21 = new ps.ActionList(); var ref49 = new Photoshop.ActionReference(); var idLyr = app.CharIDToTypeID("Lyr "); var idOrdn = app.CharIDToTypeID("Ordn"); var idTrgt = app.CharIDToTypeID("Trgt"); ref49.PutEnumerated(idLyr, idOrdn, idTrgt); list21.PutReference(ref49); desc68.PutList(idnull, list21); var idTglO = app.CharIDToTypeID("TglO"); desc68.PutBoolean(idTglO, true); app.ExecuteAction(idShw, desc68, ps.PsDialogModes.psDisplayNoDialogs); }
private int Get_Layers_Count() { Photoshop.ActionReference act = new Photoshop.ActionReference(); act.PutEnumerated(app.CharIDToTypeID("Dcmn"), app.CharIDToTypeID("Ordn"), app.CharIDToTypeID("Trgt")); var desc = app.ExecuteActionGet(act); return desc.GetInteger(app.CharIDToTypeID("NmbL")); }