
// Script function: Grey-out button.


// 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

alloc(GlobalSino)

class GlobalSino : UIFrame {

    void EMTest( object EMBook ) {
        EMBook.SetElementIsEnabled("MyTest",0)              
        result( "The button was clicked one time. \n" )
  number a, b, c
  a = 10
  b = 100
  c = a + b
  result ("c is equal to " + c + "\n\n")  
    }

    GlobalSino( object EMBook ) {
        TagGroup EMDialog = DLGCreateDialog( "" )
        TagGroup MyButton = DLGCreatePushButton("You can only click me one time!","EMTest");
        MyButton.DLGIdentifier("MyTest")
        EMDialog.DLGAddElement( MyButton)
        EMBook.init( EMDialog )
        EMBook.Display( "Please test me!" )
    }
}

