ClickScrollBar and WinScrollBar
Windows management function.
The ClickScrollBar and WinScrollBar functions simulate the movement of a scroll bar.
Syntax
ClickScrollBar(<Scrollbar_name>,<number>,LINE or PG or ABS)
WinScrollBar(H or V,<number>,LINE or PG or ABS)or
Ret=ClickScrollBar(<Scrollbar_name>,<number>,LINE or PG or ABS)
Ret=WinScrollBar(H or V,<number>,LINE or PG or ABS)Parameters
<Scrollbar_name>, string, ID of the scrollbar. During the time delay specified by #ActionTimeout, WinTask tries to find this scrollbar in the window specified by the last UseWindow statement and simulates a scroll. If the scrollbar is not found, an error is generated and the script is stopped.
<number>, number of scrolls. If the next parameter is ABS, <number> is positive starting at 0, if the next parameter equals PG or LINE, <number> simulates relative scrolls and can be negative or positive.
Use LINE for scrolling by lines, PG for scrolling by pages, and ABS for absolute positioning.
H or V : keywords for Horizontal or Vertical scrolling.
Return value
Ret, numeric return code. When successful, the function returns 0, otherwise use this return code for error management.
Remarks
If the scrollbar is a separate control within the last window specified by the most recent UseWindow, ClickScrollBar is used.
If the scrollbar is part of the last window specified by the most recent UseWindow, WinScrollBar is used.Examples
UseWindow("WINWORD.EXE|OpusMwd|SYNTAX.DOC",1)
ClickScrollBar( "1", 1, Line)
UseWindow("NOTEPAD.EXE|Edit|Untitled",1)
WinScrollBar(V, -1, Line)