Free transform

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Kukurykus, Tom, xbytor

meiyunyou
Posts: 14
Joined: Tue May 26, 2020 9:11 am

Free transform

Post by meiyunyou »

Code: Select all

ErrStrs = {}; 
ErrStrs.USER_CANCELLED=localize("$$$/ScriptingSupport/Error/UserCancelled=User cancelled the operation"); 
try {var idslct = charIDToTypeID( 'slct' );    
var desc1089 = new ActionDescriptor();    
var idnull = charIDToTypeID( 'null' );         
var ref876 = new ActionReference();         
var idMnspsp = charIDToTypeID( 'Mn  ' );         
var idMnIt = charIDToTypeID( 'MnIt' );         
var idPlce = charIDToTypeID( 'Plce' );         
ref876.putEnumerated( idMnspsp, idMnIt, idPlce );     
desc1089.putReference( idnull, ref876 ); 
executeAction( idslct, desc1089, DialogModes.ALL ); 
} catch(e){if (e.toString().indexOf(ErrStrs.USER_CANCELLED)!=-1) {;
} else{alert(localize("$$$/ScriptingSupport/Error/CommandNotAvailable=The command is currently not available"));}}
After placing the photo,How to zoom to the same size as the canvas,Free transform