darkshark, Perhaps this will help? #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #Include <ScreenCapture.au3> #Include <Misc.au3> Global $iX1, $iY1, $iX2, $iY2, $aPos, $sMsg, $sBMP_Path ; Create GUI $hMain_GUI = GUICreate("Select Rectangle", 240, 50) $hRect_Button = GUICtrlCreateButton("Mark Area", 10, 10, 80, 30) $hCancel_Button = GUICtrlCreateButton("Cancel", 150, 10, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_C