Hi subhaoviya,
Use do javascript command, below is an example.
Kasyan
------------------------------------
on manualUnsharp(amount1, radius1, threshold1, amount2, radius2, threshold2)
tell application "Adobe Photoshop CS2"
set myManualUnsharpScript to "
#target photoshop
app.bringToFront ();
var docRef = activeDocument;
makeUnsharpLayer() ;
manualUnsharp( arguments[0], arguments[1], arguments[2] );
manualUnsharp( arguments[3], arguments[4], arguments[5] );
function makeUnsharpLayer() {
if (docRef.layers.length > 1) {
for ( j = docRef.layers.length – 1; j > 0; j— ) {
if (docRef.layers.visible == false) {
docRef.layers.remove();
}
}
}
if (docRef.layers.length > 1) {
docRef.mergeVisibleLayers();
}
var myMergedLayer = docRef.activeLayer;
var mySharpLayer = docRef.activeLayer.duplicate(docRef.layers[0], ElementPlacement.PLACEBEFORE);
mySharpLayer.name = 'Unsharp Mask Layer';
docRef.activeLayer = mySharpLayer;
myMergedLayer.visible = false;
}
function manualUnsharp( amount, radius, threshold ) {
var id29 = charIDToTypeID( 'UnsM' );
var desc10 = new ActionDescriptor();
var id30 = charIDToTypeID( 'Amnt' );
var id31 = charIDToTypeID( '#Prc' );
desc10.putUnitDouble( id30, id31, amount );
var id32 = charIDToTypeID( 'Rds ' );
var id33 = charIDToTypeID( '#Pxl' );
desc10.putUnitDouble( id32, id33, radius );
var id34 = charIDToTypeID( 'Thsh' );
desc10.putInteger( id34,threshold );
try {
executeAction( id29, desc10, DialogModes.ALL );
}
catch (myError){
}
}"
do javascript myManualUnsharpScript with arguments {amount1, radius1, threshold1, amount2, radius2,
threshold2}
end tell
end manualUnsharp