Copy link to clipboard
Copied
get this
// =======================================================
var idmove = charIDToTypeID( "move" );
var desc14 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref9 = new ActionReference();
var idChnl = charIDToTypeID( "Chnl" );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref9.putEnumerated( idChnl, idOrdn, idTrgt );
desc14.putReference( idnull, ref9 );
var idT = charIDToTypeID( "T " );
var
...Copy link to clipboard
Copied
i can not find a Method to do this
Copy link to clipboard
Copied
I consider it a bad idea to reply to one’s own thread when no one else has posted a comment yet.
I for one am not clear on what you are trying to achieve.
If you want to create a CMYK file with your multichannel file’s channels additionally to the CMYK channels I think you have to add 4 channels at the top.
Have you tried recording Action Manager code with ScriptingListener.plugin yet?
Copy link to clipboard
Copied
creat a new channel it is at at the last ,i want not use the action i want use the js
Copy link to clipboard
Copied
Once again: Have you tried recording Action Manager code with ScriptingListener.plugin yet?
(This does produce JavaScript code.)
Copy link to clipboard
Copied
so thanks but it make so mach code ~~
Copy link to clipboard
Copied
zhangzaigang wrote:
creat a new channel it is at at the last ,i want not use the action i want use the js
An Alpha Channel and a save selection are the same thing. There are many ways to create an active selection using Scripting code once you have an active selection you can save is as a Alpha channel you can name it any way you want and you Load(select) alpha channels by name. It is not possible to move Alpha channels to the top of the channel stack the top of the channels stack changes with edit mode like RGB, CMYK, Grayscale and so do the number of channels these modes have. Alpha channels are below these and between these there may be the current layer's layer mask channel. I don't understand why you need to move the position of an alpha channel in the stack.
Copy link to clipboard
Copied
多谢了 thanks
Copy link to clipboard
Copied
// =======================================================
var idmove = charIDToTypeID( "move" );
var desc14 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref9 = new ActionReference();
var idChnl = charIDToTypeID( "Chnl" );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref9.putEnumerated( idChnl, idOrdn, idTrgt );
desc14.putReference( idnull, ref9 );
var idT = charIDToTypeID( "T " );
var ref10 = new ActionReference();
var idChnl = charIDToTypeID( "Chnl" );
ref10.putIndex( idChnl, 1 );
desc14.putReference( idT, ref10 );
executeAction( idmove, desc14, DialogModes.NO );
// =======================================================
var idCnvM = charIDToTypeID( "CnvM" );
var desc15 = new ActionDescriptor();
var idT = charIDToTypeID( "T " );
var idGrys = charIDToTypeID( "Grys" );
desc15.putClass( idT, idGrys );
executeAction( idCnvM, desc15, DialogModes.NO );
// =======================================================
var idCnvM = charIDToTypeID( "CnvM" );
var desc16 = new ActionDescriptor();
var idT = charIDToTypeID( "T " );
var idCMYM = charIDToTypeID( "CMYM" );
desc16.putClass( idT, idCMYM );
executeAction( idCnvM, desc16, DialogModes.NO );
pls try
Copy link to clipboard
Copied
thank you 非常感谢
Copy link to clipboard
Copied
duanlook, going grayscale first was a good idea, probably much faster than creating and moving four channels.
Copy link to clipboard
Copied
thanks i have make it
Copy link to clipboard
Copied
// =======================================================choose alpha 1 channel
var idslct = charIDToTypeID( "slct" );
var desc718 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref599 = new ActionReference();
var idChnl = charIDToTypeID( "Chnl" );
ref599.putName( idChnl, "Alpha 1" );
desc718.putReference( idnull, ref599 );
executeAction( idslct, desc718, DialogModes.NO );
// =======================================================move alpha 1 to top
var idmove = charIDToTypeID( "move" );
var desc719 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref600 = new ActionReference();
var idChnl = charIDToTypeID( "Chnl" );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref600.putEnumerated( idChnl, idOrdn, idTrgt );
desc719.putReference( idnull, ref600 );
var idT = charIDToTypeID( "T " );
var ref601 = new ActionReference();
var idChnl = charIDToTypeID( "Chnl" );
ref601.putIndex( idChnl, 1 );
desc719.putReference( idT, ref601 );
executeAction( idmove, desc719, DialogModes.NO );
// =======================================================
var idCnvM = charIDToTypeID( "CnvM" );
var desc720 = new ActionDescriptor();
var idT = charIDToTypeID( "T " );
var idGrys = charIDToTypeID( "Grys" );
desc720.putClass( idT, idGrys );
executeAction( idCnvM, desc720, DialogModes.NO );
// =======================================================
var idCnvM = charIDToTypeID( "CnvM" );
var desc721 = new ActionDescriptor();
var idT = charIDToTypeID( "T " );
var idCMYM = charIDToTypeID( "CMYM" );
desc721.putClass( idT, idCMYM );
executeAction( idCnvM, desc721, DialogModes.NO );
Copy link to clipboard
Copied
thanks 0..0
Find more inspiration, events, and resources on the new Adobe Community
Explore Now