@feiyue
Is possible to FindText work on windows that are currently transparent?
Example:
Code: Select all
WinSet,Transparent,0,Firefox
WinGet,ID,ID,Firefox
FindText_BindWindow(ID)
When the window is transparent FindText did not work.
I did a test trying to capture a image of a transparent window like:
Code: Select all
#include gdip.ahk
WinSet,Transparent,0,Firefox
WinGet,ID,ID,Firefox
pBitmap := Gdip_BitmapFromHWND(ID)
gdip_SaveBitmapToFile(pBitmap, "" A_ScriptDir "\teste.png", 100)
And it captured the image correctly even with the window full transparent.
Would like to ask if could be possible to FindText read transparent windows
----EDIT----
I have changed:
Code: Select all
if (bits.hBM) and !(w<1 or h<1)
{
win:=DllCall("GetDesktopWindow", Ptr)
hDC:=DllCall("GetWindowDC", Ptr,win, Ptr)
mDC:=DllCall("CreateCompatibleDC", Ptr,hDC, Ptr)
oBM:=DllCall("SelectObject", Ptr,mDC, Ptr,bits.hBM, Ptr)
to
Code: Select all
if (bits.hBM) and !(w<1 or h<1)
{
;win:=DllCall("GetDesktopWindow", Ptr)
;hDC:=DllCall("GetWindowDC", Ptr,win, Ptr)
hDC:=DllCall("GetDC","UInt",hWnd)
mDC:=DllCall("CreateCompatibleDC", Ptr,hDC, Ptr)
oBM:=DllCall("SelectObject", Ptr,mDC, Ptr,bits.hBM, Ptr)
Now it can capture the window transparent, but my script went from 1.5~% use of cpu to 10~11%. and my mouse pointer keeps flickering the whole time