// Script function: Input dialog to enable number entries

// 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 GlobalSino, EMItems
 
GlobalSino = DLGCreateDialog( "Enable number entries", EMItems )
 
TagGroup EMVote1 = DLGCreateCheckBox( "Entry a", 0)
TagGroup EMVote2 = DLGCreateCheckBox( "Entry b", 0)
TagGroup EMVote3 = DLGCreateCheckBox( "Entry c", 0)
 
EMItems.DLGAddElement( EMVote1 )
EMItems.DLGAddElement( EMVote2 )
EMItems.DLGAddElement( EMVote3 )
 
if ( !Alloc( UIframe ).Init( GlobalSino ).Pose() ) exit (0)
 
Result( "Entry a: " + EMVote1.DLGGetValue() + "\n" )
Result( "Entry b: " + EMVote2.DLGGetValue() + "\n" )
Result( "Entry c: " + EMVote3.DLGGetValue() + "\n" )

if ( 1 == EMVote1.DLGGetValue())
{
number a = 10
Result("a is enabled and a is equal to " + a + "\n")
}

if ( 1 == EMVote2.DLGGetValue() )
{
number b = 20
Result("b is enabled and b is equal to " + b + "\n")
}

if ( 1 == EMVote3.DLGGetValue() )
{
number c = 30
Result("c is enabled and c is equal to " + c + "\n")
}

Result( "\n\n" )


