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

"Live" Dialog box

$
0
0

Hello,

I have a question about dialog box.

I have a rectangle in artboard with dimensions 50x50mm.

When I press button "Pobierz" I would like get object width in text box.

There is any way to do this?

 

This is my initial script.

Bez nazwy-1.jpg

var myWindow = new Window ("dialog", "Dane do impozycji");

myWindow.orientation = "column";

//myWindow.alignChildren = ['', 'center'];

 

myWindow.panel1 = myWindow.add('panel', undefined, '');

  myWindow.panel1.orientation = 'column';

  

myWindow.przyciskOK = myWindow.add('button', undefined, 'Wykonaj', {name:'ok'});

  myWindow.przyciskOK.orientation = 'row';

  

myWindow.panel1.add ("statictext", undefined, "Szerokość etykiety:");

var myText = myWindow.panel1.add ('edittext {text: 0, justify: "center"}');

myText.characters = 5;

myText.active = true

myText.alignment = ["centre","centre"];

 

var pobranie = myWindow.add('button',undefined,'Pobierz');

pobranie.onClick = function() {

//THERE SHOULD BE SOME FUNCTION TO GET VALUE IN TEXT

    }

 

myWindow.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>