Jump to content

Recommended Posts

Posted

hi,

trying to find the desktop windows attributes (hight width etc) on a multi monitor setup.

iv found i can get the results im after by using this method :-

#include <WinApi.au3>
; with the mouse over desktop, either monitor
$pos = _WinAPI_GetMousePos()
$W_or_ctrl_hnd = _WinAPI_WindowFromPoint($pos)
$winpos = WinGetPos($W_or_ctrl_hnd)
ConsoleWrite("x "&$winpos[0] & @CRLF)
ConsoleWrite("y "&$winpos[1] & @CRLF)
ConsoleWrite("width "&$winpos[2] & @CRLF)
ConsoleWrite("Hight "&$winpos[3] & @CRLF)
Exit

but i need to get this info without having to use the mouse cursor, but iv tried this :-

#include <WinApi.au3>
$Hdt = _WinAPI_GetDesktopWindow()
$winpos = WinGetPos($Hdt)
ConsoleWrite("x "&$winpos[0] & @CRLF)
ConsoleWrite("y "&$winpos[1] & @CRLF)
ConsoleWrite("width "&$winpos[2] & @CRLF)
ConsoleWrite("Hight "&$winpos[3] & @CRLF&@CR&@CR)

but no go :), also tried _WinAPI_GetWindowWidth () etc

any one know how?

thx.

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...