function rotateView( inAngle )
{
// Get ID’s for the related keys
var idslct = charIDToTypeID( “slct”);
var desc = new ActionDescriptor();
var idnull = charIDToTypeID(“null”);
var ref = new ActionReference();
var idrotateTool = stringIDToTypeID(“rotateTool”);
ref.putClass(idrotateTool);
desc.putReference(idnull, ref);
executeAction(idslct, desc);
}
요건 툴 셀렉트 까지만.. 근데 저 inAngle값을 어케 처리한다?
cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };
doMenuItem = function(item, interactive) {
var ref = new ActionReference();
ref.putEnumerated(cTID(“Mn “), cTID(“MnIt”), item);
var desc = new ActionDescriptor();
desc.putReference(cTID(“null”), ref);
try {
var mode = (interactive != true ? DialogModes.NO : DialogModes.ALL);
executeAction(sTID(“select”), desc, mode);
} catch (e) {
if (!e.message.match(“User cancelled”)) {
throw e;
} else {
return false;
}
}
return true;
}
doMenuItem(cTID(‘ActP’)); // Set Zoom to 100%
doMenuItem(cTID(‘ZmIn’)); // Zoom in on time more. (200 %)
이건 줌 컨트롤 예제. 어라 줌은 찾았고 이제 로테이트를 ;ㅁ;;;;