RSInterface Controls¶
This page is about controls on runescape interfaces. These can be buttons, scrollbars, dropdowns, checkboxes, etc.
TRSSlider¶
A record meant to handle sliders in the game interfaces:

TRSSlider.GetLevel¶
function TRSSlider.GetLevel(): Integer;
Returns the slider level from 0 to 100. It’s important to keep in mind that while we use a scale from 0 to 100, don’t have that many “levels”.
For example, the brightness slider only have 5 or 6 possible positions.
Example:
WriteLn slider.GetLevel();
TRSSlider.SetLevel¶
function TRSSlider.SetLevel(level: Integer): Boolean;
Attempts to set the slider to the specified level
.
Example:
WriteLn slider.SetLevel(60);
TRSScrollBar¶
Record to handle the game interface’s scrollbars:

TRSScrollBar.Setup¶
procedure TRSScrollBar.Setup();
Method used to setup several TRSScrollBar internal variables.
When creating a TRSScrollBar you should first setup it’s Area
variable
and then call this.
Example:
scroll.Area.X1 := Bank.Bounds.X1 + 5;
scroll.Area.Y1 := Bank.Bounds.Y1 + 78;
scroll.Area.X2 := Bank.Bounds.X2 - 22;
scroll.Area.Y2 := Bank.Bounds.Y2 - 44;
scroll.Setup();
TRSScrollBar.IsVisible¶
function TRSScrollBar.IsVisible(): Boolean;
Returns True/False if the scrollbar is visible.
Example:
WriteLn Bank.Scroll.IsVisible();
TRSScrollBar.Slider¶
property TRSScrollBar.Slider: TBox;
Returns a TBox
of the scrollbar slider.
Example:
ShowOnTarget(Bank.Scroll.GetSlider());

TRSScrollBar.CanScroll¶
function TRSScrollBar.CanScroll(): Boolean;
Returns True/False if the scrollbar is “scrollable”.
A scrollbar is not scrollable if it’s not visible or if the slider occupies the whole space available.
Example:
WriteLn Chat.Scroll.CanScroll();
TRSScrollBar.GetLevel¶
function TRSScrollBar.GetLevel(): Integer;
Returns the level of the scrollbar. This is a percentage between the available space and the slider size.
Example:
WriteLn Chat.Scroll.GetLevel();
TRSScrollBar.ScrollArea¶
property TRSScrollBar.ScrollArea: TBox;
Returns a area where you can scroll the mouse, using TBiometrics between
TRSScrollBar.Area
and TRSScrollBar.Bounds
.
Example:
ShowOnTarget(Chat.Scroll.GetScrollArea());
TRSScrollBar.SetLevel¶
function TRSScrollBar.SetLevel(value: Integer): Integer;
Attempts to set a scroll level on a scrollbar.
Example:
WriteLn Chat.Scroll.SetLevel(50);
TRSScrollBar.Scroll¶
function TRSScrollBar.Scroll(amount: Integer; down: Boolean): Boolean;
Scroll amount
amount of times in a direction decided by down
.
Example:
WriteLn Chat.Scroll.Scroll(3, True);
TRSDropDownOption¶
Helper record to handle TRSDropDown options.
TRSDropDown¶
Record to handle drop downs in the game interfaces:

TRSDropDown.Setup¶
procedure TRSDropDown.Setup(options: TStringArray);
Sets up a TRSDropDown internal variables.
This has to be used after the TRSDropDown.Bounds
variable is already set.
Example:
DropDown.Setup(['Fixed - Classic layout', 'Resizable - Classic layout', 'Resizable - Modern layout']);
TRSDropDown.IsVisible¶
function TRSDropDown.IsVisible(): Boolean;
Returns true if a TRSDropDown is visible.
Example:
WriteLn Options.DropDowns[ERSOptionsDropDown.CLIENT_MODE].IsVisible();
TRSDropDown.IsOpen¶
function TRSDropDown.IsOpen(): Boolean;
Returns true if a TRSDropDown is open.
Example:
WriteLn Options.DropDowns[ERSOptionsDropDown.CLIENT_MODE].IsOpen();
TRSDropDown.WaitOpen¶
function TRSDropDown.WaitOpen(time: Integer = 600; interval: Integer = -1): Boolean;
Returns true if TRSDropDown.IsOpen returns true within time
milliseconds.
Example:
WriteLn Options.DropDowns[ERSOptionsDropDown.CLIENT_MODE].WaitOpen();
TRSDropDown.Open¶
function TRSDropDown.Open(): Boolean;
Attempts to open a TRSDropDown.
Example:
WriteLn Options.DropDowns[ERSOptionsDropDown.CLIENT_MODE].Open();
TRSDropDown.Close¶
function TRSDropDown.Close(): Boolean;
Attempts to close a TRSDropDown.
Example:
WriteLn Options.DropDowns[ERSOptionsDropDown.CLIENT_MODE].Close();
TRSDropDown.GetSelected¶
function TRSDropDown.GetSelected(): Integer;
Returns the index of the currently selected option on a TRSDropDown.
Example:
WriteLn Options.DropDowns[ERSOptionsDropDown.CLIENT_MODE].GetSelected();
TRSDropDown.Select¶
function TRSDropDown.Select(index: Integer): Boolean;
function TRSDropDown.Select(option: String): Boolean; overload;
Attempts to select an option on a TRSDropDown.
You can either use an option index or substring of an option. If you use a substring, the first match will be used.
Example:
WriteLn Options.DropDowns[ERSOptionsDropDown.CLIENT_MODE].Select('Fixed');