Hi everyone thought i would share a little function i use a lot for creating instant screenshots of the Quick Macros window
requires GDI+ get it here-->> Get GDI+
Trigger: Ctrl+Prnt Scrn
Function CaptureQmWindow
Trigger C(44)
requires GDI+ get it here-->> Get GDI+
requires GDI+ get it here-->> Get GDI+
Trigger: Ctrl+Prnt Scrn
Function CaptureQmWindow
Trigger C(44)
;Captures QM Window and saves as a png(or see below) using GDI+
;Supported formats: bmp, gif, jpg, png, tiff.(png recommended)
;creates a unique file name to avoid saving problems
;REMARKS
;requires GDI+ download it here <link "http://www.quickmacros.com/forum/showthread.php?tid=3703">Get GDI+</link>
if(getopt(nthreads)>1) ret
spe -2
;create file data
mkdir "QM_WindowImages" "$desktop$";;create folder if it doesnt exist to save images in
str sFolderName = "$desktop$\QM_WindowImages\"
str sFileName.timeformat("{yyyy-MM-dd}_{HH-mm-ss}_QmWindow");;unique filename to avoid problems
str sFormat = ".png";;i use png for smaller filesize
str sFile.format("%s%s%s" sFolderName sFileName sFormat)
;captures QM Window to memory
__GdiHandle hb
RECT r; DpiGetWindowRect _hwndqm &r
CaptureImageOnScreen r.left r.top r.right-r.left r.bottom-r.top "" hb
;save image
#compile "__Gdip"
GdipBitmap im
if(!im.FromHBITMAP(hb)) end "error"
if(!im.Save(sFile)) end "error"
;open folder where image is saved
run sFolderName
;optional open file
;run sFile;;uncomment this line to use