Jump to content

Search the Community

Showing results for tags 'wrong screen reosolution'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I recently upgraded my laptop to one with Windows 10 and higher screen resolution. In the process I found that some of my scripts did not work right when using Autoit's @DesktopWidth and @DesktopHeight macros. Insteat of 1920 x 1080 resolution Autoit detects 1536 x 864. Thus, GUIs designed to appear near the right edge of the screen displayed closer to the horizontal middle of the screen. I assume others may have the same problem. A search on this forum and Microsoft Script Center helped me to write the following script that gets the true screen width and height from WMI. MsgBox(0, '', _GetMonitorInfo()) Func _GetMonitorInfo() Local $oWMI, $Listing, $sWidth = 0, $sHeight = 0 $oWMI = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2") If IsObj($oWMI) Then $Listing = $oWMI.ExecQuery("SELECT * FROM Win32_DesktopMonitor") If IsObj($Listing) Then For $oItem In $Listing $sHeight = $oItem.ScreenHeight $sWidth = $oItem.ScreenWidth Next EndIf EndIf Return "Width: " & $sWidth & @CRLF & "Height: " & $sHeight EndFunc ;_GetMonitorInfo Hopefully it will benefit others. I for sure am very happy with all the samples I been able to find here in the past.
×
×
  • Create New...