Skip navigation
Currently Being Moderated

How to reset the values of attributes for Crop Tool?

Jun 5, 2012 2:39 AM

Tags: #photoshop #script #javascript #scripting #photoshop_scripting

There are options in the Tool Bar that appears left while opening adobe photoshop.

If any of the option (for ex: Crop tool) is selected, its attributes will be displayed at top of photoshop appllication

 

I need to set/reset the values for the height, width, resolution..etc attributes of the Crop Tool through my script.

Kindly advise me through scripting(vbscript/javascript) for phoshop(cs4, cs5). I have attached the screenshot for your review.Photoshop.JPG

 

Can any one help me?

 

Thanks

 
Replies
  • Currently Being Moderated
    Jun 5, 2012 2:47 AM   in reply to Maria prabhudoss

    Those fields are not directly accessable via scripting. You might be able to access them using sendkeys.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 5, 2012 7:03 AM   in reply to Maria prabhudoss

    It would need an external program to put the cursor and enter values at the correct positions.

    It isn't possible to script it.

    You could create presets and then select the preset you want, but you can't create a preset via scripting.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 5, 2012 10:10 AM   in reply to Paul Riggott

    send key enter to select first ( your value ) tab for rest…?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 5, 2012 1:16 PM   in reply to Maria prabhudoss

    Would resetting the current tool options work: (javascript)

     

     

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

    var id6 = charIDToTypeID( "Rset" );

        var desc3 = new ActionDescriptor();

        var id7 = charIDToTypeID( "null" );

            var ref2 = new ActionReference();

            var id8 = charIDToTypeID( "Prpr" );

            var id9 = charIDToTypeID( "CrnT" );

            ref2.putProperty( id8, id9 );

            var id10 = charIDToTypeID( "capp" );

            var id11 = charIDToTypeID( "Ordn" );

            var id12 = charIDToTypeID( "Trgt" );

            ref2.putEnumerated( id10, id11, id12 );

        desc3.putReference( id7, ref2 );

    executeAction( id6, desc3, DialogModes.NO );

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points