SelectBrushTool() SelectBrushPreset("Soft Round") SetBrushSize(100) function SelectBrushTool() { var V1 = new ActionDescriptor(); var V2 = new ActionReference(); V2.putClass(charIDToTypeID("PbTl")); V1.putReference(charIDToTypeID("null"), V2); executeAction(charIDToTypeID("slct"), V1, DialogModes.NO); } function SelectBrushPreset(name) { var V1 = new ActionDescriptor(); var V2 = new ActionReference(); V2.putName(charIDToTypeID("Brsh"), name); V1.putReference(charIDToTypeID("null"), V2); executeAction(charIDToTypeID("slct"), V1, DialogModes.NO); } function SetBrushSize(size){ var V1 = new ActionDescriptor(); var V2 = new ActionReference(); V2.putEnumerated(charIDToTypeID("Brsh"),charIDToTypeID("Ordn"),charIDToTypeID("Trgt")); V1.putReference(charIDToTypeID("null"), V2); var V3 = new ActionDescriptor(); V3.putUnitDouble(stringIDToTypeID("masterDiameter"),charIDToTypeID("#Pxl"), size); V1.putObject(charIDToTypeID("T "),charIDToTypeID("Brsh"), V3); executeAction(charIDToTypeID("setd"), V1, DialogModes.NO); var id13 = stringIDToTypeID( "50" ); } |