//In the interface code segment, the setup function //is the initial function call. function setup() { //Set the form title bar to say "Hello World!!" ui.Title ="Hello World!!"; //Set the height and width of the form in pixels ui.Height =150; ui.Width =340; //Add a label and a textbox to the form. ui.AddLabel("lblName", "Enter a Name:", "Enter a name below"); ui.AddTextBox("txtName", "World", "Enter a name in here"); //The number of times to repeat "Hellow World!!" input.item("timesToRepeat") =10; //Tells MyGeneration to display the form. If this is //set to false. MyGeneration skips displaying the //form, but retains any changes made in the interface //code segment. ui.ShowGUI =true; }
VBScript
'In the interface code segment, the setup function 'is the initial function call. Sub setup() 'Set the form title bar to say "Hello World!!" ui.Title ="Hello World!!" 'Set the height and width of the form in pixels ui.Height =150 ui.Width =340 'Add a label and a textbox to the form. ui.AddLabel "lblName", "Enter a Name:", "Enter a name below" ui.AddTextBox "txtName", "World", "Enter a name in here" 'The number of times to repeat "Hellow World!!" input.item("timesToRepeat") =10 'Tells MyGeneration to display the form. If this is 'set to false. MyGeneration skips displaying the 'form, but retains any changes made in the interface 'code segment. ui.ShowGUI =true End Sub