Beim Skript von Greenhorn bekomme ich x=8 und y=8 als Rand
C
#Region ;************ Includes ************
#include <WinAPISysWin.au3>
#include <WinAPIShPath.au3>
#EndRegion ;************ Includes ************
$sPfad_explorer_tmp = "C:\"
Run("explorer.exe /N,/E," & $sPfad_explorer_tmp, "", @SW_MAXIMIZE)
If StringLen($sPfad_explorer_tmp) = 3 Then
$sTitel_tmp = "(" & StringMid($sPfad_explorer_tmp, 1, 2) & ") " & DriveGetLabel($sPfad_explorer_tmp)
Else
$sPfad_explorer_tmp = _WinAPI_PathRemoveBackslash($sPfad_explorer_tmp)
$aSplit_explorer = StringSplit($sPfad_explorer_tmp, "\")
$sTitel_tmp = $aSplit_explorer[UBound($aSplit_explorer) - 1]
EndIf
$sExplorer_titel_1 = "[REGEXPCLASS:^(Explore|Cabinet)WClass$" & "; TITLE:" & $sTitel_tmp & "]"
WinWait($sExplorer_titel_1)
$hExplorer_1 = WinGetHandle($sExplorer_titel_1)
$tWINDOWINFO = _WinAPI_GetWindowInfo($hExplorer_1)
ConsoleWrite('x: ' & DllStructGetData($tWINDOWINFO, 'cxWindowBorders') & @CRLF)
ConsoleWrite('y: ' & DllStructGetData($tWINDOWINFO, 'cxWindowBorders') & @CRLF)
Alles anzeigen
Beim Skript von Bitnugger sitzt der Explorer zu weit oben

Ändere ich das Skript und werfe es manuell nach links passt der Explorer

Code
;-- TIME_STAMP 2020-01-05 01:10:43
Global $sExplorerPath, $sRx, $hExplorer, $aPos
$sExplorerPath = "C:\" ; WindowTitle = "<DriveLabel> (C:)" oder "(C:) <DriveLabel>"
;~ $sExplorerPath = "C:\Windows\System32\" ; WindowTitle = "System32"
$sRx = '[REGEXPCLASS:^(Explore|Cabinet)WClass$; REGEXPTITLE:^' & _
(StringRegExp($sExplorerPath, '(?i)(^[a-z]:\\?$)') _
? '\(' & StringLeft($sExplorerPath, 2) & '\) ' & DriveGetLabel($sExplorerPath) & '|' & DriveGetLabel($sExplorerPath) & ' \(' & StringLeft($sExplorerPath, 2) & '\)' _ ; "C:\"
: StringRegExpReplace($sExplorerPath, '(?:.+\\)?(.+)\\$', '\1')) & _ ; "C:\Windows\System32\"
'$]'
ConsoleWrite("@@_Debug_line" & @TAB & @TAB & @ScriptLineNumber & " $sRx --> " & $sRx & @CRLF)
$hExplorer = WinGetHandle($sRx)
If Not IsHWnd($hExplorer) Then
RunWait("explorer.exe /N,/E," & $sExplorerPath, "", @SW_MAXIMIZE)
$hExplorer = WinWait($sRx, '', 3)
Else
WinSetState($hExplorer, '', @SW_MAXIMIZE)
EndIf
If IsHWnd($hExplorer) Then
ConsoleWrite("@@_Debug_line" & @TAB & @TAB & @ScriptLineNumber & " $hExplorer --> " & $hExplorer & ' "' & WinGetTitle($hExplorer) & '"' & @CRLF)
WinActivate($hExplorer)
ConsoleWrite("@@_Debug_line" & @TAB & @TAB & @ScriptLineNumber & " @DesktopWidth --> " & @DesktopWidth & @CRLF)
ConsoleWrite("@@_Debug_line" & @TAB & @TAB & @ScriptLineNumber & " @DesktopHeight --> " & @DesktopHeight & @CRLF)
$aPos = WinGetPos($hExplorer)
ConsoleWrite("@@_Debug_line" & @TAB & @TAB & @ScriptLineNumber & " @SW_MAXIMIZE $aPos --> " & StringFormat('%5i, %5i, %5i, %5i\r\n', $aPos[0], $aPos[1], $aPos[2], $aPos[3]))
;~ Send('#{LEFT}') ;>>> Fenster manuell nach links werfen
Sleep(5000)
$aPos = WinGetPos($hExplorer) ; <-- Diese Werte müssten bei WinMove angeben werden, damit es genauso wie mit Send('#{LEFT}') funktioniert!
ConsoleWrite("@@_Debug_line" & @TAB & @TAB & @ScriptLineNumber & " Send #{LEFT} $aPos --> " & StringFormat('%5i, %5i, %5i, %5i\r\n', $aPos[0], $aPos[1], $aPos[2], $aPos[3]))
EndIf
Alles anzeigen
Dann bekomme ich als Rand x=7 und y=0 raus, was wieder stimmen würde.
Aber im Vorfeld komme ich wohl nicht an die Daten.