Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Capture Qm Window
#1
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)     Help - how to add the trigger to the macro
Code:
Copy      Help
;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
requires GDI+ get it here-->> Get GDI+


Messages In This Thread
Capture Qm Window - by Kevin - 07-31-2018, 11:16 PM
RE: Capture Qm Window - by win - 05-07-2019, 12:40 AM
RE: Capture Qm Window - by Kevin - 05-07-2019, 01:10 AM
RE: Capture Qm Window - by win - 05-07-2019, 01:14 AM
RE: Capture Qm Window - by Kevin - 05-07-2019, 01:51 AM
RE: Capture Qm Window - by win - 05-07-2019, 01:55 AM
RE: Capture Qm Window - by Kevin - 05-07-2019, 02:04 AM
RE: Capture Qm Window - by win - 05-07-2019, 02:09 AM
RE: Capture Qm Window - by Kevin - 05-07-2019, 02:34 AM
RE: Capture Qm Window - by win - 05-10-2019, 12:46 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)