How to transmit the data?


in script create window edittext field , 2 buttons. user can write in edittext field. how read these data? want use pattern in regular expressions.

i made edittext field variable. how transmit data it?

 

function snpcreatedialog()
{
this.windowref = null;
}


snpcreatedialog.prototype.run = function()
{
// create window of type palette.
var win = new window("palette", "Поиск",[100,100,400,250]);  // bounds = [left, top, right, bottom]
this.windowref = win;

// add frame contents.
win.pnl = win.add("panel", [25,15,275,135], "Введите данные для поиска");

// add components, 2 buttons
    var txt = win.pnl.add("edittext", [15,25,230,45],"");
    //win.pnl.txt = win.pnl.add("edittext", [15,25,230,45],"");
win.pnl.okbtn = win.pnl.add("button", [15,75,105,95], "ok");
win.pnl.cancelbtn = win.pnl.add("button", [140, 75, 230, 95], "cancel");

// register event listeners define button behavior

 

var re = new regexp(pattern);
   
    win.pnl.okbtn.onclick = function() {
  $.writeln("ok pressed");
  alert(re);
        //win.close();
};
win.pnl.cancelbtn.onclick = function() {
  $.writeln("cancel pressed");
  win.close();
};

// display window
win.show();
 
return true;
   
//var re = new regexp (txt);
//alert(re);
}

 

if(typeof(snpcreatedialog_unittest) == "undefined") {
    new snpcreatedialog().run();
}



More discussions in FrameMaker Scripting


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account