Search the Community
Showing results for tags 'autoit window info'.
-
Hey Why does Windows 10 "AutoIt Window Info" give the wrong window position? WinMove() moves the window to a different point than parameters? -look script The test script moves the notepad.exe window to 0, 0, the real window coordinates are 8, 0 Modified script add WinGetPos() and MouseMove() and MouseGetPos() #include <ScreenCapture.au3> Local $iPID = Run("notepad.exe", "") WinWait("[CLASS:Notepad]", "", 10); Wait 10 seconds for the Notepad window to appear. WinMove ("[CLASS:Notepad]", "", 0, 0, 600, 400) WinActivate("[CLASS:Notepad]") Send("WinMove ('[CLASS:Notepad]', "", 0, 0, 600, 400){ENTER}") Send("@DesktopWidth: " & @DesktopWidth & "{ENTER}") Send("@DesktopHeight: " & @DesktopHeight & "{ENTER}") Send("@DesktopDepth: " & @DesktopDepth & "{ENTER}") Send("@OSArch: " & @OSArch & "{ENTER}") Send("@OSBuild: " & @OSBuild & "{ENTER}") Send("@OSServicePack: " & @OSServicePack & "{ENTER}") Send("@OSType: " & @OSType & "{ENTER}") Send("@OSVersion: " & @OSVersion & "{ENTER}") Send(WinGetPos("[CLASS:Notepad]") & "{ENTER}") Send("X: " & WinGetPos("[CLASS:Notepad]")[0] & "{ENTER}") Send("Y: " & WinGetPos("[CLASS:Notepad]")[1] & "{ENTER}") Send("Width: " & WinGetPos("[CLASS:Notepad]")[2] & "{ENTER}") Send("Height: " & WinGetPos("[CLASS:Notepad]")[3] & "{ENTER}") MouseMove(0,400) Send("MouseMove(0,400){ENTER}") Send("MouseGetPos() X: " & MouseGetPos()[0] & "Y: " & MouseGetPos()[1]) Sleep(100) _ScreenCapture_Capture('C:\temp\screen.bmp',0,0,800,600) MsgBox(0,"Info","Save screen to C:\temp\screen.bmp" & @CRLF & "Click OK to view the bitmap") Run("explorer.exe C:\temp\screen.bmp") Is ALWAYS such a difference 8px (in every Windows 7, 8, Server)?