Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

how i move a alpha channel to the top? i want to change the multichannel to my own colorfile

New Here ,
Jan 07, 2015 Jan 07, 2015

QQ图片20150107163006.jpg

get this1234.jpg

TOPICS
Actions and scripting
766
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Jan 07, 2015 Jan 07, 2015

// =======================================================

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

...
Translate
Adobe
New Here ,
Jan 07, 2015 Jan 07, 2015

i can not find a Method to do this

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 07, 2015 Jan 07, 2015

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 07, 2015 Jan 07, 2015

creat a new channel it is at at the last ,i want not use the action i want use the js

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 07, 2015 Jan 07, 2015

Once again: Have you tried recording Action Manager code with ScriptingListener.plugin yet?

(This does produce JavaScript code.)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 07, 2015 Jan 07, 2015

so thanks but it make so mach code ~~

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 07, 2015 Jan 07, 2015

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.

JJMack
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 07, 2015 Jan 07, 2015

多谢了 thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 07, 2015 Jan 07, 2015

// =======================================================

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 07, 2015 Jan 07, 2015

thank you 非常感谢

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 08, 2015 Jan 08, 2015

duanlook, going grayscale first was a good idea, probably much faster than creating and moving four channels.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 08, 2015 Jan 08, 2015

thanks i have make it

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 08, 2015 Jan 08, 2015

// =======================================================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 );

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 08, 2015 Jan 08, 2015
LATEST

thanks 0..0

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines