I want to get the window coordinates of the command line window I tried following but it cannot acces the variable $aPos...   Local $sCommandlinePath = "C:\Windows\system32\cmd.exe"
RunCm()
Func RunCm()
   RunWait($sCommandlinePath)
   ; Retrieve the position as well as height and width of the active window.
   Local $aPos = WinGetPos("[CLASS:ConsoleWindowClass]")
   ; Display the array values returned by WinGetPos.
   MsgBox($MB_SYSTEMMODAL, "", "X-Pos: " & $aPos[0] & @CRLF & _
		 "Y-Pos: " & $aPos[1] & @CRLF & _
		 "Width: " & $aPos[2] & @CRLF & _
		 "Height: " & $aPos[3])
EndFunc
While 1
   Sleep(1000)
   RunCm()
WEnd