HankHell Posted October 17, 2019 Share Posted October 17, 2019 (edited) Opens up a semi-transparent resizable GUI window, then takes a screenshot of the size and location with PrintScreen #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <ScreenCapture.au3> HotKeySet("{PRINTSCREEN}", "Takepic") $gui = GUICreate("gui", 100, 100, @DesktopWidth /2, @DesktopHeight /2, BitOR($WS_POPUP, $WS_THICKFRAME), $WS_EX_TOPMOST) GUICtrlCreateLabel("", 0, 0, 100, 100, -1, $GUI_WS_EX_PARENTDRAG) WinSetTrans($gui, "", 150) GUISetState(@SW_SHOW) While 1 Sleep(100) $winsize = WinGetClientSize($gui) $winpos = WinGetPos($gui) WEnd Func Takepic() WinSetTrans($gui, "", 0) Local $randomness = Random(0, 999999) $randomnumber = Round($randomness) _ScreenCapture_Capture($randomnumber&".jpg", $winpos[0]+7, $winpos[1]+7, ($winsize[0]+$winpos[0]+6), ($winsize[1]+$winpos[1]+6)) Exit EndFunc Edited October 18, 2019 by HankHell typo Skeletor, MarkIT and ahmeddzcom 1 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now