Skip to main content
继文陈22342816
Participant
July 15, 2016
Question

How to use 'pnt'

  • July 15, 2016
  • 1 reply
  • 450 views

  var desc107 = new ActionDescriptor(); 

        var idHrzn = charIDToTypeID( "Hrzn" ); 

        var idPxl = charIDToTypeID( "#Pxl" ); 

        desc107.putUnitDouble( idHrzn, idPxl, x ); 

        var idVrtc = charIDToTypeID( "Vrtc" ); 

        var idPxl = charIDToTypeID( "#Pxl" ); 

        desc107.putUnitDouble( idVrtc, idPxl, y ); 

    var idPnt = charIDToTypeID( "Pnt " ); 

executeAction( idPnt, desc107); 

This topic has been closed for replies.

1 reply

JJMack
Community Expert
Community Expert
July 15, 2016

That look like Action manager code from the Sciptlistener plugin.  Event ID are four character long I believe it should be "pnt " not "pnt". Your missing a space " ". To use the Paint Bucket you should first set the foreground color and perhaps make a selection.

When I used the paint bucket without a selection Fill was recorded "fl  "

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

var idFl = charIDToTypeID( "Fl  " );

    var desc6 = new ActionDescriptor();

    var idFrom = charIDToTypeID( "From" );

        var desc7 = new ActionDescriptor();

        var idHrzn = charIDToTypeID( "Hrzn" );

        var idPxl = charIDToTypeID( "#Pxl" );

        desc7.putUnitDouble( idHrzn, idPxl, 856.000000 );

        var idVrtc = charIDToTypeID( "Vrtc" );

        var idPxl = charIDToTypeID( "#Pxl" );

        desc7.putUnitDouble( idVrtc, idPxl, 778.000000 );

    var idPnt = charIDToTypeID( "Pnt " );

    desc6.putObject( idFrom, idPnt, desc7 );

    var idTlrn = charIDToTypeID( "Tlrn" );

    desc6.putInteger( idTlrn, 32 );

    var idAntA = charIDToTypeID( "AntA" );

    desc6.putBoolean( idAntA, true );

    var idUsng = charIDToTypeID( "Usng" );

    var idFlCn = charIDToTypeID( "FlCn" );

    var idFrgC = charIDToTypeID( "FrgC" );

    desc6.putEnumerated( idUsng, idFlCn, idFrgC );

executeAction( idFl, desc6, DialogModes.NO );

Where did you  get that code it look like it is from within some function someone created from scriptlistener code the statements note the hilighted constants above

        desc107.putUnitDouble( idHrzn, idPxl, x );

and

        desc107.putUnitDouble( idVrtc, idPxl, y );

look like a couple of constants were replaced by variables x and y

JJMack