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

Count tool default change

Enthusiast ,
Jul 12, 2012 Jul 12, 2012

I'm using this to preselect the count tool:

//////////////////////

selectTool('countTool');

//

function selectTool(tool) {

    var desc9 = new ActionDescriptor();

        var ref7 = new ActionReference();

        ref7.putClass( app.stringIDToTypeID(tool) );

    desc9.putReference( app.charIDToTypeID('null'), ref7 );

    executeAction( app.charIDToTypeID('slct'), desc9, DialogModes.NO );

};

///////////////////////

After select it I don't want to use the default color, but another one  and marker size point to 5 and I want to change it before start using it again by default.

Can be done by javascript code?

TOPICS
Actions and scripting
554
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
Adobe
Community Expert ,
Jul 13, 2012 Jul 13, 2012
LATEST

This the code the script listener spits out:

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

var idslct = charIDToTypeID( "slct" );

    var desc3 = new ActionDescriptor();

    var idnull = charIDToTypeID( "null" );

        var ref2 = new ActionReference();

        var idcountTool = stringIDToTypeID( "countTool" );

        ref2.putClass( idcountTool );

    desc3.putReference( idnull, ref2 );

    var iddontRecord = stringIDToTypeID( "dontRecord" );

    desc3.putBoolean( iddontRecord, true );

    var idforceNotify = stringIDToTypeID( "forceNotify" );

    desc3.putBoolean( idforceNotify, true );

executeAction( idslct, desc3, DialogModes.NO );

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

var idcountColor = stringIDToTypeID( "countColor" );

    var desc4 = new ActionDescriptor();

    var idRd = charIDToTypeID( "Rd  " );

    desc4.putInteger( idRd, 151 );

    var idGrn = charIDToTypeID( "Grn " );

    desc4.putInteger( idGrn, 153 );

    var idBl = charIDToTypeID( "Bl  " );

    desc4.putInteger( idBl, 253 );

executeAction( idcountColor, desc4, DialogModes.NO );

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

var idcountGroupMarkerSize = stringIDToTypeID( "countGroupMarkerSize" );

    var desc6 = new ActionDescriptor();

    var idSz = charIDToTypeID( "Sz  " );

    desc6.putInteger( idSz, 5 );

executeAction( idcountGroupMarkerSize, desc6, 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