Get Screen Resolution
Verb: getScreenResolution
Available from: <Standard>
Gets the width and height values, in pixels, of a monitor connected to the machine running the script using, the desired screen index.
Syntax
getScreenResolution --screenindex(Numeric) (Numeric)=width (Numeric)=height
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--screenindex | Screen index | Required | Number | Number indicating which of the screens connected to the machine you want the resolution for. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
width | Width | Number | Width in pixels. |
height | Height | Number | Height in pixels. |
Example
Gets the resolution of the main screen where the script is running.
defVar --name width --type Numeric
defVar --name height --type Numeric
getScreenResolution --screenindex 1 width=width height=height
// Displays the screen resolution in the console.
logMessage --message "${width}\r\n${height}" --type "Info"
Remarks
In Screen index, the count starts from number 1.