Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

palette don't work on Illustrator

Participant ,
Nov 14, 2018 Nov 14, 2018

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.

TOPICS
Scripting
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 14, 2018 Nov 14, 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?

Translate
Adobe
Community Expert ,
Nov 14, 2018 Nov 14, 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 15, 2018 Nov 15, 2018
LATEST

Oooh thank you, I will see it

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines