function winRun() { var ui_code = "dialog { \ text: 'My Window Title', \ bounds: [100,10,310,100], \ w_label: StaticText { text:'Width mm', bounds:[10, 5, 70, 25] }, \ w_input: EditText { text:'100', bounds: [75, 5, 120, 25] }, \ h_label: StaticText { text:'Height mm', bounds:[10, 30, 70, 50] }, \ h_input: EditText { text:'200', bounds:[75, 30, 120, 50] }, \ my_btn: Button { text:'Fun', bounds:[130, 5, 200, 25] }, \ run_btn: Button { text:'Run', bounds:[130, 30, 200, 50], properties:{name:'ok'}}, \ quit_btn: Button { text:'Quit', bounds:[130, 55, 200, 75], properties:{name:'cancel'}} \ }"; var ui = new Window(ui_code); ui.my_btn.onClick = function() {alert("My Function Here");} var result = ui.show(); alert(result + '\n' + ui.w_input.text + '\n' + ui.h_input.text); } winRun();