BoxButtonStat

 

Determines whether a push-button in a WinBatch box has been pressed.

Syntax:

BoxButtonStat(box ID, button ID)

Parameters:

(i) box ID the ID number of the desired WinBatch box.

(i) button ID the ID number of the desired push-button.

Returns:

(i) @TRUE if the button has been pressed; @FALSE if it hasn't.

 

This function will also toggle the button back to "unpressed".

 

Example:

;; sample script for BoxButtonStat
bDraw1=1
bDraw2=2
BoxesUp("200,200,700,700", @NORMAL)
BoxDrawText(1, "0,310,1000,1000", "WinBatch Box Example - BoxButtonStat%@crlf% Pick a Button", @FALSE, 1)
BoxButtonDraw(1, bDraw1, "Button 1", "200,464,450,558")
BoxButtonDraw(1, bDraw2, "Button 2", "550,464,800,558")
bWho=0
While bWho == 0
   For x =1 To 2
      If BoxButtonStat(1,x) Then bWho=x
   Next
EndWhile
Switch bWho
   Case 1
      Display(3,"Button Example", "You pushed Button 1")
      Break
   Case 2
      Display(3,"Button Example", "You pushed Button 2")
      Break
EndSwitch
See Also:

BoxButtonDraw, BoxButtonKill, BoxButtonWait, BoxesUp, BoxNew