Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
auto clip of desktop image
#1
Since I cannot have a transparent background on an OnScreenDisplay, I'd like to be able to grab a section of the desktop image (as it shows rather than out of the file itself) and put that into an OSD background so that it 'looks' like its transparent?
An old blog on QM coding and automation.

The Macro Hook
#2
I can try to do it on Vista but don't know how on XP.
#3
how about doing it old school on XP with a W+d and grabbing a block of pixels from x y to x2 y2 and saving that to a jpg?
An old blog on QM coding and automation.

The Macro Hook
#4
toolbar would not be updated when background changes, for example when you move toolbar
#5
that's ok...I would call the process each time anyway if necessary anyway.
An old blog on QM coding and automation.

The Macro Hook
#6
Toolbar
Code:
Copy      Help
;/hook tb_hook_chameleon
test :out "test"

Function tb_hook_chameleon
Code:
Copy      Help
;/
function# hWnd message wParam lParam

sel message
,case WM_INITDIALOG
,__MemBmp* mb._new
,SetProp hWnd "tb_hook_chameleon_mb" mb
,RECT r
,GetClientRect hWnd &r
,POINT p; ClientToScreen hWnd &p
,mb.Create(r.right r.bottom 1 p.x p.y)
,
,case WM_DESTROY
,mb=+GetProp(hWnd "tb_hook_chameleon_mb")
,mb._delete
,RemoveProp hWnd "tb_hook_chameleon_mb"
,
,case WM_ERASEBKGND
,mb=+GetProp(hWnd "tb_hook_chameleon_mb")
,GetClientRect hWnd &r
,BitBlt wParam 0 0 r.right r.bottom mb.dc 0 0 SRCCOPY
,ret 1
#7
:lol:
wow that is amazing! and it works a lot faster than i thought it would too!

I was looking over the code but can't seem to make sense of it enough to do that for an OSD too. How can I do that?
An old blog on QM coding and automation.

The Macro Hook
#8
this is without changing system functions
Macro
Code:
Copy      Help
str s="text wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww"

;at first show transparent OSD
OnScreenDisplay s 0 0 0 0 0 0 0 "osd_chameleon"
;get its coordinates
int hWnd=win("osd_chameleon" "QM_OSD_Class")
RECT r; GetClientRect hWnd &r
POINT p; ClientToScreen hWnd &p
;capture screen and save bitmap
__MemBmp mb
mb.Create(r.right r.bottom 1 p.x p.y)
SaveBitmap mb.bm "$temp$\osd_chameleon.bmp"
;close
spe; hid hWnd; clo hWnd
;then show another OSD with that bitmap
OnScreenDisplay 0 0 p.x-1 p.y-1 0 0 0 1|128|16 0 0 0 "$temp$\osd_chameleon.bmp"
#9
oh, now this is just fantastic!

thanks.
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 3 Guest(s)