Cropping a selection (JS CS3)


hi -- developing script in user chooses 1 of 3 predetermined sizes image dialog. displays crop selection not crop until user has chance change crop area (but not size).

 

i can create target crop selection action, cannot figure out how crop selection area. size same -- know how enter in script. not know how tell script crop selected area.

 

is there way using app.activedocument.crop() command can have crop selected area?

 

or there simple command can put in script "crop" after user changes crop area , hits ok button in dialog. (obviously, user can doublelclick set crop -- ok button other things after crop, , trying eliminate many clicks possible.)

 

any appreciated.

it has been app's default behavior when using 'crop' menubar active selection… using recorded function may out…?

 

#target photoshop  app.bringtofront();  var docref = app.activedocument; //docref.flatten(); crop(); //docref.selection.deselect();  // crop active selection function crop() {      function ctid(s) { return app.charidtotypeid(s); };           var desc001 = new actiondescriptor();      executeaction(ctid('crop'), desc001, dialogmodes.no); } 



More discussions in Photoshop Scripting


adobe

Comments

Popular posts from this blog

Hur installera Joomla på One.com - Joomla! Forum - community, help and support

removing index.php from URL address - Joomla! Forum - community, help and support

「イメージマップのアンカー名には、...」のエラーが出ないようにしたい