Anders,
If I am following what you want, the script below will input upper and lower limits and add them to a data table. I have annotated the script to hopefully allow you to see what the example is doing.
Names Default To Here( 1 );
// Create the new data table and it"s columns
dt = New Table( "Limits" );
dt << New Column( "UpperLimit", Numeric, Continuous );
dt << New Column( "LowerLimit", Numeric, Continuous );
// Open a display window to enter the data into
InputWindow = New Window( "Enter Input",
// Add a verticle list box to structure the position of the display
V List Box(
// Add some space
Spacer Box( size( 1, 10 ) ),
// Display the instruction text
Text Box( " Enter in the inputs" ),
Spacer Box( size( 1, 10 ) ),
// The following displays need to be side by side
H List Box(
// Display text to infor the user what data to enter
Text Box( "Enter in the Lower Limit" ),
Spacer Box( size( 10, 1 ) ),
// Use a number edit box to capture the users input and
// give the display object the name "LLimit"
LLimit = Number Edit Box( . ),
Spacer Box( size( 10, 1 ) ),
// Display text to infor the user what data to enter
Text Box( "Enter in the Upper Limit" ),
Spacer Box( size( 10, 1 ) ),
// Use a number edit box to capture the users input and
// give the display object the name "ULimit"
ULimit = Number Edit Box( . )
),
Spacer Box( size( 1, 10 ) ),
// Add a couple of control buttons
H List Box(
// The first button box will add the values to the data table, if the
// values are valid
Button Box( "Add the Values",
If( Is Missing( LLimit << get ) == 0 & Is Missing( ULimit << get ) == 0 & (ULimit << get) > (LLimit << get),
// If the values are valid, add a row to the data table and set the values
dt << add rows( 1 );
dt:LowerLimit[N Rows( dt )] = LLimit << get;
dt:UpperLimit[N Rows( dt )] = ULimit << get;
,
// If the values are not valid, set them to missing and
// display a dialog to the user
LLimit << set( . );
ULimit << set( . );
Dialog( "The values entered are invalid:" );
)
),
Spacer Box( size( 10, 1 ) ),
// This button box closes the display window
Button Box( "Stop Adding", InputWindow << Close Window )
)
)
);
Jim