what is wrong ?
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$q1=Random(0,10,1)
$q2=Random(0,10,1)
$Form1 = GUICreate("mate", 200, 151, 247, 132)
$Label1 = GUICtrlCreateLabel($q1, 24, 40, 20, 17)
$Label2 = GUICtrlCreateLabel($q2, 64, 40, 20, 17)
$Input1 = GUICtrlCreateInput(" ", 102, 36,20, 17,0x2000)
$Label3 = GUICtrlCreateLabel("+", 44, 40, 20, 17)
$Label4 = GUICtrlCreateLabel("=", 84, 40, 20, 17)
$Button1 = GUICtrlCreateButton("OK", 100, 112, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
$rez=$q1+$q2
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button1
if $Input1 = $rez Then
MsgBox(0,"","Yes")
Else
MsgBox(0,"","No")
EndIf
Exit
EndSwitch
WEnd