up Inquisit Language Reference

getpercentx function

Returns the horizontal percentage corresponding to the pixels.

Member of

<display>

Syntax

element.name.getpercentx(percent, monitor)

Parameters

Name Type Description
percent integer The horizontal pixels.
monitor integer The monitor number (optional).

Examples

The following displays the horizontal percentage corresponding to 300 pixels on the second monitor:

<text sometext>
/ items= ("percentage = <% display.getpercentx(300, 2) %>")
</text>

The following displays the horizontal percentage corresponding to last mouse coordinate on the default (first) monitor:

<page somepage>
percentage = <% display.getpercentx(mouse.x) %>
</page>

Send comments on this topic:
Copyright Millisecond Software, LLC. All rights reserved.