Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to speed up Scan in Widows 8.1?
#10
2015-06-04. Fixed: often does not work with flag 1.

Function FastPixel
Code:
Copy      Help
;/
function x y hwnd [flags] ;;flags: 1 client area

;Gets pixel color from window.
;Almost same as pixel(x y hwnd flags), but faster when Aero theme is enabled.
;When Aero is enabled, works in background windows.
;Does not activate the window.
;If hwnd is 0, gets from screen, slow.


__Hdc dc
if(!hwnd) dc=GetDC(0); ret GetPixel(dc x y)

if(!IsWindow(hwnd)) end ERR_WINDOW
dc=iif((flags&1) GetDC(hwnd) GetWindowDC(hwnd))
__MemBmp m.Create(1 1 dc x y) ;;GetPixel fails if not in clipping region
ret GetPixel(m.dc 0 0)
test
Macro Macro2545
Code:
Copy      Help
int w=win("Registry Editor" "RegEdit_RegEdit")
int c=id(2 w) ;;list
act w
0.5

PerfFirst
;_i=pixel(100 100 c 1)
_i=FastPixel(100 100 c 1)
PerfNext;PerfOut
out F"0x{_i}"


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)