For a Text object named myText, to get the scrollbar information, use the following syntax:
var scrollInfo = myText.GetScrollInfo()
Note:
In this example, the variable scrollInfo becomes a new object containing the Return Value properties of myText. To reference a property, use the following syntax:
scrollInfo.vpos
//the vertical scroll position of the object.
ScrollInfo.vscrollbar
//the vertical scrollbar object.