Hi, the WinGetPos gives bad values on some windows whilst the Windows Spy gives correct values. I have happened to meet such windows a few times, now I remember only 2 - X1.exe (paid SW) and MyPhoneExplorer portable, for example:
Windows Spy x: 322 y: 193 w: 1024 h: 1061
WinGetPos 1170, 194, 29, 29
I have tried WinGetPosEx (I found it on the forum) and "DetectHiddenWindows, on".
And the WinMove doesn't work with this windows.
I use updated AHK 64 bit, but this problem I have seen maybe for 10 years.
WinGetPos gives on some win bad values
WinGetPos gives on some win bad values
I am average user (only 10 000 AHK lines).
Re: WinGetPos gives on some win bad values
Try using a different WinTitle (ahk_idvs ahk_pidvs ahk_exevs Title). Sometimes they will give a different value because a different windows API function is being used to retrieve it, and the windows API is very difficult and convoluted to know under what circumstances exactly which values will be retrieved. Had a similar issue where ahk_exe was retrieiving a path with an extra ".\" in the string, but Process, Exist or DllCall("QueryFullProcessImageName") was not, but only for some processes.
Who is online
Users browsing this forum: No registered users and 89 guests