2012-06-22 3 views

답변

5

이것은 스크립트의 후보로 보인다. 이 시도 :

function selectTextWhosePointSizeIs (minPointSize, maxPointSize) 
{ 
    var doc, tfs, i = 0, n = 0, selectionArray = []; 

    if (!app.documents.length) { return; } 

    doc = app.activeDocument; 
    tfs = doc.textFrames; 
    n = tfs.length; 

    if (!n){ return; } 

    if (isNaN (minPointSize)) 
    { 
     alert(minPointSize + " is not a valid number"); 
     return; 
    } 
    else if (isNaN (maxPointSize)) 
    { 
     alert(maxPointSize + " is not a valid number"); 
     return; 
    } 
    else if (minPointSize > maxPointSize) 
    { 
     alert(minPointSize + " can't be greater than "+ maxPointSize); 
     return; 
    } 

    for (i = 0 ; i < n ; i++) 
    { 
     if (tfs[i].textRange.size >= minPointSize && tfs[i].textRange.size <= maxPointSize) 
     { 
      selectionArray [ selectionArray.length ] = tfs[i]; 
     } 
    } 

    if (selectionArray.length) 
    { 
     app.selection = selectionArray; 
    } 
    else 
    { 
     alert("Nothing found in this range."); 
    } 
} 

selectTextWhosePointSizeIs (12, 14); 

는 희망이 도움이,

루이

관련 문제