0
Change trap units using javascript
Engaged
,
/t5/photoshop-ecosystem-discussions/change-trap-units-using-javascript/td-p/13719889
Apr 11, 2023
Apr 11, 2023
Copy link to clipboard
Copied
Is it possible to change trap units from pixels to millimeters using javascript. By default, trap units are set on pixels, i need to change it to millimeters using javacsript. I use this script to complete traping, and it works correct only if units are manualy changed to millimeters. How to imporve this?
var idTrap = charIDToTypeID( "Trap" );
var desc6698 = new ActionDescriptor();
var idWdth = charIDToTypeID( "Wdth" );
var idRlt = charIDToTypeID( "#Rlt" );
desc6698.putUnitDouble( idWdth, idRlt, 0.566895 );
executeAction( idTrap, desc6698, DialogModes.NO );
TOPICS
Actions and scripting
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explore related tutorials & articles
milevic
AUTHOR
Engaged
,
/t5/photoshop-ecosystem-discussions/change-trap-units-using-javascript/m-p/13719899#M723509
Apr 11, 2023
Apr 11, 2023
Copy link to clipboard
Copied
Or just to alert user that units are not in millimeters...
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/photoshop-ecosystem-discussions/change-trap-units-using-javascript/m-p/13719957#M723511
Apr 12, 2023
Apr 12, 2023
Copy link to clipboard
Copied
Seems that we have chewed on this meat before:
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
milevic
AUTHOR
Engaged
,
LATEST
/t5/photoshop-ecosystem-discussions/change-trap-units-using-javascript/m-p/13720014#M723516
Apr 12, 2023
Apr 12, 2023
Copy link to clipboard
Copied
Obviously we didn't chew it all 🙂 It was two years ago, i hope there are some updates 🙂
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

