// Script function: Input dialogs for selecting a default value by checking box

// Unless named starting with GlobalSino, EM, My, Self, the function commands are defined 
//by Gatan DM, please see at link: http://www.globalsino.com/EM/page2597.html
 
TagGroup GlobalSinoDialog, EMItems

GlobalSinoDialog = DLGCreateDialog( "Compute 100 * x = ", EMItems )
number b = 100
TagGroup MyOptions = DLGCreateRadioList( 10 ) // "10" here says the default selection is the one with the same number below.
 
MyOptions.DLGAddRadioItem( "0", 0 )
MyOptions.DLGAddRadioItem( "10", 10 ) // "10" is the default selection pointed above.
MyOptions.DLGAddRadioItem( "20", 20)
 
EMItems.DLGAddElement( DLGCreateLabel( "Please select a number:" ) )       
 
EMItems.DLGAddElement( MyOptions )       
 
if ( !Alloc( UIframe ).Init( GlobalSinoDialog ).Pose() ) exit (0)
 
number c = MyOptions.DLGGetValue()
number d = b * c
Result( "The obtained value is " + d + "\n" )