AHK Window Info 1.7
From <!-- m -->http://msdn.microsof... ... 33(v=vs.85<!-- m -->).aspx
In your script you do exactly that.An application must not delete a DC whose handle was obtained by calling the GetDC function. Instead, it must call the ReleaseDC function to free the DC
something like this:
<!-- m -->http://imageshack.us... ... d01ay.png/<!-- m -->
Gui, 1:Add, Text, x5 y28 Section, Pos. rel. to Window Gui, 1:Add, Edit, x+2 yp-3 w80 vEdtDataMousePosWin, Gui, 1:Add, Button, x+28 yp-1 vBtnShowList gBtnShowList -Wrap, % iif(ChkShowList,"<< Less Info","More Info >>")with this
Gui, 1:Add, Text, x5 y28 Section, PosRel W/C Gui, 1:Add, Edit, x+2 yp-3 w70 vEdtDataMousePosWin, ; Gui, 1:Add, Text, x145 y28 Section, Control Gui, 1:Add, Edit, x+2 yp w70 vEdtDataMousePosCon, Gui, 1:Add, Button, x+2 yp-1 vBtnShowList gBtnShowList -Wrap, % iif(ChkShowList,"<< Less Info","More Info >>")and lines 1216-1228
GetMouseInfo: ;get mouse pos relative to windows WinGetPos, WindowActiveX, WindowActiveY,,, A WinGetPos, WindowX, WindowY,,, ahk_id %MouseWindowUID% MouseWindowActiveX := MouseScreenX - WindowActiveX MouseWindowActiveY := MouseScreenY - WindowActiveY MouseWindowX := MouseScreenX - WindowX MouseWindowY := MouseScreenY - WindowY GuiControl, 1:, EdtMousePosScreen, x%MouseScreenX% y%MouseScreenY% GuiControl, 1:, EdtMousePosWin, x%MouseWindowX% y%MouseWindowY% GuiControl, 1:, EdtEasyMousePosWin, x%MouseWindowX% y%MouseWindowY% GuiControl, 1:, EdtDataMousePosWin, x%MouseWindowX% y%MouseWindowY% GuiControl, 1:, EdtMousePosAWin, x%MouseWindowActiveX% y%MouseWindowActiveY%with
GetMouseInfo: ;get mouse pos relative to windows WinGetPos, WindowActiveX, WindowActiveY,,, A WinGetPos, WindowX, WindowY,,, ahk_id %MouseWindowUID% MouseWindowActiveX := MouseScreenX - WindowActiveX MouseWindowActiveY := MouseScreenY - WindowActiveY MouseWindowX := MouseScreenX - WindowX MouseWindowY := MouseScreenY - WindowY MouseControlX := MouseWindowX - ControlX - 1 MouseControlY := MouseWindowY - ControlY - 1 GuiControl, 1:, EdtMousePosScreen, x%MouseScreenX% y%MouseScreenY% GuiControl, 1:, EdtMousePosWin, x%MouseWindowX% y%MouseWindowY% GuiControl, 1:, EdtEasyMousePosWin, x%MouseWindowX% y%MouseWindowY% GuiControl, 1:, EdtDataMousePosWin, x%MouseWindowX% y%MouseWindowY% GuiControl, 1:, EdtDataMousePosCon, x%MouseControlX% y%MouseControlY% GuiControl, 1:, EdtMousePosAWin, x%MouseWindowActiveX% y%MouseWindowActiveY%
However, when I ran the script with AutoHotkey Basic or AutoHotkey_L 32-bit on my 64-bit Windows 7 system, it frequently caused explorer.exe to crash. The reason was that it tries to allocate memory in explorer.exe to retrieve information from the Desktop ListView, but the pointer to this memory gets truncated from 64-bit to 32-bit. I worked around this by compiling the script with a 64-bit AutoHotkeySC.bin. (I never saw the script crash, just explorer.exe.)
Windows7
You need to disable the Aero theme by changing it to the Basic or, better still, Classic theme.Not sure why, but the 'Mouse' tab is EXTREMELY slow to re-draw.
Windows7
Would anyone know if it is possible to adapt this script to be compatible with the Aero theme?
Edit: Here's a link to the code since the script is so long.
:idea: Gui -ThemeNot sure why, but the 'Mouse' tab is EXTREMELY slow to re-draw.
Windows7
A note to the author.
From <!-- m -->http://msdn.microsof... ... 33(v=vs.85<!-- m -->).aspxIn your script you do exactly that.An application must not delete a DC whose handle was obtained by calling the GetDC function. Instead, it must call the ReleaseDC function to free the DC
in fact, i have seen cases where a script will memory leak if you DONT delete it. i'm talking specifically about a DC obtained from GetDC, not something like CreateCompatibleDC. so microsofts docs are not reliable in this case.
altho the OS probably won't let you delete the DC internally since i highly doubt you can delete DC's from other processes
anyway i might fix this script and update it not only with the fast getpixel but also for windows settings at 120dpi since all the edit boxes are off. plus i find the gui on this thing to be horrible
edit/
oh, i see Uberi's version already fixes the 120dpi, thats makes the gui a lot easier to read
Why not? You can delete bitmaps and icons from other processes, and those are also GDI objects.altho the OS probably won't let you delete the DC internally since i highly doubt you can delete DC's from other processes