
In control panel double click the mouse icon. All you would be doing is grabbing and dragging the transform bounding box to where you want it then accept.Answer: open the control panel. The transform function stops all scripts/actions until the transform is either accepted or canceled. Then when you are finished and click the check, you can have the script make a selection without that boundary and copy then paste into your other document. With what you are doing, you could just have the script set up a new layer with the dimensions you want (95x95) and initiate the transform function. Once I align the overlay by resizing, rotating, moving, etc., I click on the checkmark to accept transformation and the script crops the image to the bounding box of the transform.
#MOUSE COORDINATES CODE#
I'll describe what I do and if you think something similar will work, let me know and I'll give you the code I have for it.Īt the cropping stage, my script opens up an image with an overlay pattern, copies it and pastes onto a new layer, then selects that layer to be transformed using the "Free Transform" tool. I do something similar in my work flow when I crop. Now I think I understand more of what you're looking for here. If ( BridgeTalk.isRunning( "bridge" ) ) " show debugger on runtime error

Var saveFile = File(filePath+"/"+fileName) Īpp.activeDocument.close(SaveOptions.DONOTSAVECHANGES) Here is an example of selecting the files in Bridge then runnthe script from Photoshop, this will create the thumbs in the original folder. Ref33.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') ) ĭesc48.putReference( charIDToTypeID('null'), ref33 ) ĭesc48.putEnumerated( charIDToTypeID('FTcs'), charIDToTypeID('QCSt'), charIDToTypeID('Qcsa') ) ĭesc49.putUnitDouble( charIDToTypeID('Hrzn'), charIDToTypeID('#Rlt'), 0.000000 ) ĭesc49.putUnitDouble( charIDToTypeID('Vrtc'), charIDToTypeID('#Rlt'), 0.000000 ) ĭesc48.putObject( charIDToTypeID('Ofst'), charIDToTypeID('Ofst'), desc49 ) ĭesc48.putUnitDouble( charIDToTypeID('Hght'), charIDToTypeID('#Prc'), 100.001) ĮxecuteAction( charIDToTypeID('Trnf'), desc48, DialogModes.ALL )

Ref33.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), charIDToTypeID('Trsp') ) ĭesc51.putReference( charIDToTypeID('T '), ref33 ) ĮxecuteAction( charIDToTypeID('setd'), desc51, DialogModes.NO ) Ref32.putProperty( charIDToTypeID('Chnl'), charIDToTypeID('fsel') ) ĭesc51.putReference( charIDToTypeID('null'), ref32 ) value, LB.value+95]], SelectionType.REPLACE, 0, false) ĮxecuteAction( charIDToTypeID( "Crop" ), undefined, DialogModes.NO ) Īpp.lerUnits = startRulerUnits


Var startRulerUnits = lerUnits Ī(, ], SelectionType.REPLACE, 0, false) ĮxecuteAction(stringIDToTypeID('copyToLayer'), undefined, DialogModes.NO) One way of doing the selection in batch is to make a selection, create a layer via copy, transform, at this point the user can transform the selection and drag it anywhere on the document, useing the top left corner as the selection point, get layer bound, remove the tempory layer and crop using the co-ordinates.
