By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

AutoIt Desktopheight Macro

Reference on the desktopheight macro in AutoIt - shows how to get the desktopheight in your AutoIt scripts.

Edited: 2015-12-07 14:02

The AutoIt Desktopheight Macro can be used to easily fetch the height of the screen.

Macros are written with the "@" (at) sign in front of them. Example of how to use @desktopheight is shown below:

  PixelSearch($StartWidth + 1, $StartHeight + 1, @desktopwidth, @desktopheight)

The Desktopheight macro is typically used together with desktopwidth to return the dimensions of the screen, which is useful when coding with script compatibility in mind since screen resolutions can vary depending on the user-preferences, and across different systems.