Posts: 1,769
Threads: 410
Joined: Feb 2003
Is there a way to get the transparentcy level of a window?
I'm looking to make a macro that subtracts 25 or 50 each time you trigger it.
thanks.
Posts: 12,097
Threads: 142
Joined: Dec 2002
Transparent calls SetLayeredWindowAttributes, so there should be GetLayeredWindowAttributes too. And it is.
dll user32 #GetLayeredWindowAttributes hwnd *crKey !*bAlpha *dwFlags
Transparent _hwndqm 200 0xff0000
1
int col flags; byte alpha
GetLayeredWindowAttributes _hwndqm &col &alpha &flags
out "0x%X" col
out alpha
out flags
Posts: 1,769
Threads: 410
Joined: Feb 2003
THIS IS FREAKIN' AWESOME!!!!
Now I can just step through the opacity till i reach the level i like!
THANKS
Posts: 1,769
Threads: 410
Joined: Feb 2003
this only works on the qm editor...what am i doing wrong?
dll user32 #GetLayeredWindowAttributes hwnd *crKey !*bAlpha *dwFlags
int col flags; byte alpha
int z
GetLayeredWindowAttributes _hwndqm &col &alpha &flags
z=30
alpha+z
if alpha>255-z
,;alpha=256
,bee "C:\downloads\sounds\system\comp3.wav"
,Transparent(win 256)
,end
Transparent(win alpha)
Posts: 12,097
Threads: 142
Joined: Dec 2002
_hwndqm is QM window handle. Use win instead.
Posts: 1,769
Threads: 410
Joined: Feb 2003