Copier le lien dans le Presse-papiers
Copié
Copier le lien dans le Presse-papiers
Copié
Copier le lien dans le Presse-papiers
Copié
Copier le lien dans le Presse-papiers
Copié
There is the same problem still in CS4—you can declare your window as a palette but you can’t access the app. object while your palette is open. So it doesn’t make sense.
Copier le lien dans le Presse-papiers
Copié
Do you have this statement at the beginning of your script?:
#targetengine illustrator
JET
Copier le lien dans le Presse-papiers
Copié
#targetengine doesn’t work for me.
A simple example:
#targetengine illustrator
var obj = app.activeDocument.selection[0]; // select any single pathItem
alert (obj.filled); // works fine
var res = "palette{btn: Button {text: 'OK', name: 'ok'}}";
win = new Window(res);
win.btn.onClick = function () {
alert ('Hello world!'); // works perfect any time I press the button
alert (obj.filled); // no effect
}
win.show();
And yes, palette is floating like any normal palette. But it doesn’t function like a normal.
Illustrator CS4, script launched from Illustrator menu.
Trouvez plus d’idées, d’événements et de ressources dans la nouvelle communauté Adobe
Explorer maintenant