0

私は Indesign CS5.5 で CornerEffects.jsx スクリプトを書き直して、学校でより使いやすいようにしようとしています。これにより、人々は最初のポイントがどこにあり、最後のポイントがどこにあるかなどを正確に知ることができます。スクリプトは CS3 で次のように動作する必要があります。良い。長方形が選択されたオブジェクトである場合にのみオプションを変更し、それ以外の場合はデフォルトにフォールバックする必要があります。次のスニペットを試してみましたが、とにかくデフォルトに戻ります。みんなありがとう。

function myDisplayDialog(myObjectList){
        if (app.selection.constructor.name == "Rectangle"){                 
        var myStringList = ["all points","first point (top-left)", "last point(top-right)", "second point(bottom-left)", "third point(bottom-right)", "fourth point(top-right)", "first two", "second and third", "last two", "first and last", "odd points", "even points"]
        }
         else{  
             var myStringList = ["all points","first point", "last point", "second point", "third point", "fourth point", "first two", "second and third", "last two", "first and last", "odd points", "even points"]
        }
4

1 に答える 1

0

それを見るだけで、通常は「selection.constructor」ではなく「selection[0].constructor」を使用しますが、この修正で機能するかどうかはわかりません。ExtendScript Toolkit のコードをステップ実行して、どこが間違っているかを確認できるはずです。値を簡単に確認できるように、ステップに分割すると役立つ場合があります。

好奇心から、InDesign スクリプトを教えている学校はどこですか?

于 2011-09-26T07:23:00.860 に答える