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.