Here another example to mark the desktop to get the marked region for capturing. This example is not perfect and not very fast (room for improvements).
;Coded by UEZ build 2020-08-07 beta
;Code cleanup up mLipok
;
;Short instruction: mark area on your desktop and press return key to capture.
#include <APISysConstants.au3>
#include <Array.au3>
;#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <ScreenCap