// Script function: Input dialog to select an option // 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( "Dialog", EMItems ) TagGroup GlobalSinoTg = DLGCreateList( 25, 8 ) GlobalSinoTg.DLGAddListItem( "option 0", 1 ) // 0 defaults to unselected. GlobalSinoTg.DLGAddListItem( "option 1", 0 ) GlobalSinoTg.DLGAddListItem( "option 2", 0 ) GlobalSinoTg.DLGAddListItem( "option 3", 0 ) EMItems.DLGAddElement( DLGCreateLabel( "Please select an option:" ) ) EMItems.DLGAddElement( GlobalSinoTg ) if ( !Alloc( UIframe ).Init( GlobalSino ).Pose() ) exit (0) Result( "\n\n" ) number a = GlobalSinoTg.DLGGetValue() Result( "Selected Option is " + a + "\n" ) string GlobalSinoLabel if ( GlobalSinoTg.DLGGetNthLabel( GlobalSinoTg.DLGGetValue(), GlobalSinoLabel ) ) Result( "Your selected is " + GlobalSinoLabel + "\n" )