Options

The options file holds functions and procedures that are used to interact with the runescape options menu.

The source for this file can be found here.

Consts, Types, Vars

The following constants, types and variables are used throughout the collectBox methods.

type TRSOptions

type
  TRSOptions = type TRSInterface;

A type that stores functions and properties of the Runescape options menu.

var options

var
  options: TRSOptions;

A variable through which scripters can access the TRSOptions type methods.

TRSOptions methods

The following methods should be called through the options variable.

Example:

if options.isOpen() then
  writeln('Options interface is open!');

isOpen

function TRSOptions.isOpen(waitTime: integer = 0): boolean;

Returns true if the options interface is open. The optional waitTime parameter (default = 0) is the maximum time (in milliseconds) it will keep looking.

Note

  • by Coh3n
  • Last Updated: 5 August 2015 by The Mayor

Example:

if options.isOpen() then
  writeln('The options menu is open!');

open

function TRSOptions.open(waitTime: integer = 5000): boolean;

Returns true if the options interface is successfully opened. The optional waitTime parameter (default = 5000) is the maximum time (in milliseconds) it will keep looking.

Note

  • by Coh3n
  • Last Updated: 5 August 2015 by The Mayor

Example:

if (options.open()) then
  writeln('We opened the options interface');

_getOptions

function TRSOptions._getOptions(var Buttons: TBoxArray; var Texts: TStringArray): boolean;

Passes all the buttons on the options menu as a TBoxArray Buttons and passes a TStringArray Texts of the text for each button. Returns true if successfull.

Note

  • by Ashaman88
  • Last Updated: 26 February 2014 by Ashaman88

Example:

var
  txt: TStringArray;
  tba: TBoxArray;
begin
  if options._getOptions(tba, txt) then
    writeLn('We have all the button bounds and text');
end;

selectOption

function TRSOptions.selectOption(txt: TStringArray): boolean;

Returns true if it successfully clicks the button on the options menu that matches a string in the TStringArray txt .

Note

  • by Ashaman88
  • Last Updated: 26 February 2014 by Ashaman88

Example:

if options.selectOption(['Logout', 'gout']) then
  writeLn('Successfully clicked the logout button!');