Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CaptureImageOrColor Enquiry
#4
The code is correct, but don't need to capture 2 times.
Look in Task Manager, maybe QM or some other process uses very much memory or many GDI objects. White screen could be if QM fails to allocate memory for whole screen, it may require 5-10 MB for each monitor, depending on screen size.

Function CaptureImage
Trigger CWc     Help - how to add the trigger to the macro
Code:
Copy      Help
RECT r
str sout.from("$temp$\Image_" _s ".bmp")

__GdiHandle hBitmap
int i=CaptureImageOrColor(hBitmap 0 0 sout r)
if !i
,out "Failed to capture"
,end

int q=OpenClipboard(_hwndqm)
if(q) EmptyClipboard; q=SetClipboardData(CF_BITMAP hBitmap)!0; CloseClipboard
if(q) hBitmap.handle=0

_s.from("Image captured stored to clipboard - also stored to file " sout)
OnScreenDisplay _s


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)