#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("MCF Requested Version", 148, 50, 469, 469, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
GUISetBkColor(0x335EA8)
$Button1 = GUICtrlCreateButton("Start", 0, 0, 147, 25, 0)
$Button2 = GUICtrlCreateButton("Stop", 0, 24, 147, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Case $Button2
Exit
Case $Button1
While 1
$pos = MouseGetPos()
ToolTip("x = " & $pos[0] & " y = " & $pos[1], $pos[0]+5, $pos[1]+5)
WEnd
Case $Button2
Exit
Func TheEnd()
Exit
EndFunc
Exit
EndSwitch
WEnd
When I click start it does what I want, but when I click stop it doesnt stop. Help please.