Paragraph.GetScrollPos

number Paragraph.GetScrollPos (

string ObjectName,

boolean Vertical = true )

Description

Returns the vertical or horizontal scroll position of a paragraph object.

Parameters

ObjectName

(string) The name of the paragraph object.

Vertical

(boolean) Whether the position will be returned for the vertical scroll bar handle:

VALUE

DESCRIPTION

true

The position will be returned for the vertical scroll bar. (Default)

false

The position will be returned for the horizontal scroll bar.

Returns

(number) The position (line number) of the vertical scroll handle if Vertical is set to true (relative to the top of the vertical scroll handle). If Vertical is set to false, the position in scroll bar units (approximately 10 pixels) of the horizontal scroll handle will be returned (relative to the left side of the horizontal scroll handle). If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.

See also: Related Actions