Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

dialog vs palette

$
0
0

How do I change a text in Illustrator using a window type PALETTE when using DIALOG PALETTE works but with no, someone can explain me why?

 

my script is...

 

#target Illustrator

 

var sourceDoc=app.activeDocument;

 

var myMaterials = ["FILME POLIÉSTER HOLOGRÁFICO", "FILME BOPP METALIZADO","FILME BOPP BRANCO","PAPEL COUCHÊ", "PVC PLANO"];

 

var myWin = new Window ("dialog","Materiais");

myWin.orientation = "row";

 

myNewList=myWin.add ("dropdownlist", undefined, myMaterials);

myNewList.selection = 0;

 

myOkButton=myWin.add ("button", undefined, "Ok",{name: "ok"});

myCancelButton=myWin.add ("button", undefined, "Cancelar",{name: "cancel"});

 

myNewList.onChange = function () {

   

    var item=myNewList.selection

    var myTextFrame = sourceDoc.textFrames.getByName("MATERIAL");

    myTextFrame.contents=item;

      }

 

myWin.show ();


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>