nimda,
Very encouraging words. Thank you! I'm plugging along pretty well and have a lot of things running as they were in XP. I use the magnifier script that has been talked about a lot on the forum. I've searched the forum until my hand cramped up but I still can't get this working on win 7. Any ideas? Perhaps I should post to the ask for help section?
Thanks in advance!
Relayer
Code:
#NoEnv
#SingleInstance, Force
SetWinDelay, 10
CoordMode, Mouse, Screen
DetectHiddenWindows, On
Magnifier()
ExitApp
^q::
ExitApp
Magnifier(bInvert = False)
{
Global nZ, nW, nH, vW, flag
vW := 3
nZ := 2 ; Zoom Factor
nW := A_ScreenWidth // vW //2//nZ ; Width of (small) Target Rectangle // is floor division (rounds down)
nH := A_ScreenHeight// (2 * vW) //2//nZ ; Height of (small) Target Rectangle
RunIt:
ToolTip, %A_Space%
WinGet, hWnd, ID, ahk_class tooltips_class32
WinClose, ahk_class SysShadow ; Comment it out to have the DropShadow
hDC_SC := DllCall("GetDC", "Uint", 0)
hDC_LW := DllCall("GetDC", "Uint", hWnd)
hDC_TT := DllCall("GetDC", "Uint", hWnd)
DllCall("SetStretchBltMode", "Uint", hDC_TT, "int", 4)
Loop
{
MouseGetPos, xCursor, yCursor
DllCall("BitBlt", "Uint", hDC_LW, "int", 0, "int", 0, "int", 2*nW, "int", 2*nH, "Uint"
, hDC_SC, "int", xCursor-nW, "int", yCursor-nH, "Uint", 0x40CC0020)
If bInvert
DllCall("BitBlt", "Uint", hDC_LW, "int", 0, "int", 0, "int", 2*nW, "int", 2*nH
, "Uint", 0, "int", 0, "int", 0, "Uint", 0x00550009)
Cursor(hDC_LW, nW, nH) ; Capture magnified mouse cursor.
DllCall("StretchBlt", "Uint", hDC_TT, "int", 0, "int", 0, "int", 2*nW*nZ, "int", 2*nH*nZ
, "Uint", hDC_LW, "int", 0, "int", 0, "int", 2*nW, "int", 2*nH, "Uint", 0x00CC0020)
Cursor(hDC_TT, nW*nZ, nH*nZ) ; Capture un-magnified mouse cursor.
WinMove, ahk_id %hWnd%,, xCursor-(nW*nZ+1), yCursor+nH, 2*(nW*nZ+1), 2*(nH*nZ+1)
If GetKeyState("Esc")
Break
If (flag)
Break
}
DllCall("ReleaseDC", "Uint", 0, "Uint", hDC_SC)
DllCall("ReleaseDC", "Uint", hWnd, "Uint", hDC_LW)
DllCall("ReleaseDC", "Uint", hWnd, "Uint", hDC_TT)
if (flag)
{
HelpTip = Magnify
HelpTip = %HelpTip%`n {Up} = magnify more
HelpTip = %HelpTip%`n {Down} = magnify less
HelpTip = %HelpTip%`n {Left} = reduce viewer size
HelpTip = %HelpTip%`n {Right} = increase viewer size
ToolTip, %HelpTip%
While flag
{
}
Goto RunIt
}
else
WinClose, ahk_id %hWnd%
}
Up::
nZ += 1
nW := A_ScreenWidth // vW //2//nZ
nH := A_ScreenHeight// (2 * vW) //2//nZ
Return
Down::
nZ := ( (nZ = 1) ? (nZ) : (nZ - 1) )
nW := A_ScreenWidth // vW //2//nZ
nH := A_ScreenHeight// (2 * vW) //2//nZ
Return
Left::
vW := ( (vW = 10) ? (vW) : (vW + 1) )
nW := A_ScreenWidth // vW //3//nZ
nH := A_ScreenHeight// (2 * vW) //2//nZ
Return
Right::
vW := ( (vW = 1) ? (vW) : (vW - 1) )
nW := A_ScreenWidth // vW //2//nZ
nH := A_ScreenHeight// (2 * vW) //2//nZ
Return
F1::
flag := ( (flag) ? (False) : (True) )
Return
Cursor(hDC, xCenter, yCenter)
{
VarSetCapacity(mi, 20, 0)
mi := Chr(20)
DllCall("GetCursorInfo", "Uint", &mi)
ptr := &mi + 4
bShow := *ptr++ | *ptr++ << 8 | *ptr++ << 16 | *ptr++ << 24
hCursor := *ptr++ | *ptr++ << 8 | *ptr++ << 16 | *ptr++ << 24
DllCall("GetIconInfo", "Uint", hCursor, "Uint", &mi)
ptr := &mi + 4
xHotspot := *ptr++ | *ptr++ << 8 | *ptr++ << 16 | *ptr++ << 24
yHotspot := *ptr++ | *ptr++ << 8 | *ptr++ << 16 | *ptr++ << 24
hBMMask := *ptr++ | *ptr++ << 8 | *ptr++ << 16 | *ptr++ << 24
hBMColor := *ptr++ | *ptr++ << 8 | *ptr++ << 16 | *ptr++ << 24
DllCall("DeleteObject", "Uint", hBMMask)
DllCall("DeleteObject", "Uint", hBMColor)
If bShow
DllCall("DrawIcon", "Uint", hDC, "int", xCenter - xHotspot, "int", yCenter - yHotspot, "Uint", hCursor)
}