Quote:
Please don't. I updated the script after reading your post.
Oh! lol. i thought it was there the whole time and i was being dumb.
What i mean by hidden windows, is in the script i just posted, some windows wont show, such as objectdock, the main window of my winamp skin and my msn app, but in your magnifier then it shows these.
And what i mean by not becoming 1 pixel, is that when the following script is run, then the magnifier starts off as 1 pixel and u can increase it to 300 pixels, but id like it to start so as you cannot see it, and then can increase it to 300 pixels and then at any point can decrease it so that you cant see it again, so basically i need it to enter a null loop when you press F11 and the width is 1 pixel, and break from this loop on pressing F12.
Code:
#NoEnv
#SingleInstance, Force
SetWinDelay, 1
nZ := 2.6 ; Zoom Factor
nR := 1 ; Rectangle of the Zoomer
CoordMode, Mouse
CoordMode, Pixel
ToolTip, %A_Space%
WinClose, ahk_class SysShadow
WinGet, hWnd, ID, ahk_class tooltips_class32
WinSet, ExStyle, +0x00000020, ahk_id %hWnd%
hDC_SC := DllCall("GetDC", "Uint", 0)
hDC_TT := DllCall("GetDC", "Uint", hWnd)
loop:
Loop
{
MouseGetPos, xmouse, ymouse
DllCall("StretchBlt", "Uint", hDC_TT, "int", 0, "int", 0, "int", nR*2, "int", nR*2, "Uint", hDC_SC, "int", xmouse-nR//nZ, "int", ymouse-nR//nZ, "int", nR//nZ*2, "int", nR//nZ*2, "Uint", 0x00CC0020)
WinMove, ahk_id %hWnd%,, xmouse-nR, ymouse-nR, nR*2, nR*2
WinSet, AlwaysOnTop, On, ahk_id %hWnd%
}
F6::
Exit:
DllCall("ReleaseDC", "Uint", 0, "Uint", hDC_SC)
DllCall("ReleaseDC", "Uint", hWnd, "Uint", hDC_TT)
ExitApp
F12::
If nR < 300
{
nR += 35
}
return
F11::
If nR > 1
{
nR -= 35
}
return
Hope I've explained myself ok.
Edit: I think it's because you've used BitBlt in your magnifier, and from what I can tell, you're stretching that, so I think BitBlt can "see" these windows, where StretchBlt cant, but so far I cant get the mouse into the centre of the magnifier :/