vip88 Posted February 6, 2021 Share Posted February 6, 2021 #include <WinAPISys.au3> MsgBox(0x44,"debug", @DesktopWidth & "x" & @DesktopHeight) MsgBox(0x44,"debug", _WinAPI_GetSystemMetrics(78) & "x" & _WinAPI_GetSystemMetrics(79)) The above codes return 1024x640, but OS report 1280x800. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 6, 2021 Developers Share Posted February 6, 2021 Moved to the appropriate forum. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
LarsJ Posted February 6, 2021 Share Posted February 6, 2021 Why use 78 and 79 for the virtual screen and not 0 and 1 for the primary display monitor? Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
argumentum Posted February 6, 2021 Share Posted February 6, 2021 (edited) 12 hours ago, LarsJ said: Why use 78 and 79 for the virtual screen Likely in case of multiple monitors I'd guess. #include <WinAPISys.au3> ConsoleWrite(@DesktopWidth & "x" & @DesktopHeight & @CRLF) ; 2560x1080 @ 100% ; 2048x864 @ 125% ConsoleWrite( _WinAPI_GetSystemMetrics(0) & "x" & _WinAPI_GetSystemMetrics(1) & @CRLF) ; 2560x1080 ; 2048x864 @ 125% ConsoleWrite( _WinAPI_GetSystemMetrics(78) & "x" & _WinAPI_GetSystemMetrics(79) & @CRLF) ; 3760x1920 ; 3760x1920 @ 125% on monitor 1 ... I have 2 monitors. @vip88, I guess the same answer as in https://www.autoitscript.com/forum/topic/205087-pixelgetcolor-return-value-is-not-correct-when-xy-reported-by-au3info-moved/ , so use _WinAPI_EnumDisplayMonitors(). Edit: I see, that "AutoIt v3 Window Info" nor CV, compensates for monitor scaling. I'll look into that for CV. Edit2: You can find the answer in _WinAPI_SetProcessDpiAwareness(). Edited February 7, 2021 by argumentum added code Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now