Skip to main content
Inspiring
November 15, 2018
解決済み

palette don't work on Illustrator

  • November 15, 2018
  • 返信数 1.
  • 1188 ビュー

Hello, hello,

I am learing Script UI and Scripting and I have a problem with palette in scripting Illustrator.

I want use palette to make window Script UI and use it to work with layers in illustrator but don't work.

I paste my code :

--------------------------------------------------

var windowString = 'palette\

{text: "My window",\

    myEditText: EditText {characters: 20},\

    myButton: Button {text: "Modify ?"}\

}';

var myWindow = new Window(windowString);

function modify()

{

    var myValue;

    valeur = myWindow.myEditText.text;

    myLayer.name = myValue

};

myWindow.myButton.addEventListener("click", modify);

var myDoc = app.activeDocument;

var myLayer = myDoc.activeLayer;

myWindow.show()

--------------------------------------------------

With type : palette, I can't work with Illustrator object (just app, for exemple app.beep() work) but no with document object or path item.

It's work with type : dialog (I can wotk with path item an othes Illustrator objects) )but I need use palette.

Can I get your help please ?

Sorry for my bad english, i can explain again if you want.

このトピックへの返信は締め切られました。
解決に役立った回答 CarlosCanto

that's a know issue, to use a Palette window and interact with Illustrator you need to use BridgeTalk, here's a sample thread but you can search the forum, we have posted lots of samples about this topic

Is it possible to use AI "selection sets" in script and scriptUI?

返信数 1

CarlosCanto
Community Expert
CarlosCantoCommunity Expert解決!
Community Expert
November 15, 2018

that's a know issue, to use a Palette window and interact with Illustrator you need to use BridgeTalk, here's a sample thread but you can search the forum, we have posted lots of samples about this topic

Is it possible to use AI "selection sets" in script and scriptUI?

Inspiring
November 15, 2018

Oooh thank you, I will see it