Hero Screen

The heroscreen file holds functions and procedures that are used to interact with the runescape Hero Screen.

The source for this file can be found here.

Consts, Types, Vars

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

type TRSHeroScreen

type
  TRSHeroScreen = type TRSInterface;

A type that stores the Hero Screen interface properties.

var heroScreen

var
  heroScreen: TRSHeroScreen;

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

TRSHeroScreen methods

The following methods should be called through the heroScreen variable.

Example:

if heroScreen.isOpen() then
  writeln('Herostone screen is open!');

isOpen

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

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

Note

  • by The Mayor
  • Last Updated: 17 January 2015 by The Mayor

Example:

if heroScreen.isOpen() then
  writeln('It''s open!');

open

function TRSHeroScreen.open(waitTime: integer = 3000): boolean;

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

Note

  • by The Mayor
  • Last Updated: 17th January 2015 by The Mayor

Example:

if heroScreen.open() then
  writeln('We opened the hero screen');

close

function TRSHeroScreen.close(escape: boolean = true): boolean;

Returns true if the heroScreen is successfully closed. It uses the ESC key by default, but the escape parameter can be set to false to close via the mouse.

Note

  • by The Mayor
  • Last Updated: 17 January 2015 by The Mayor

Example:

if heroScreen.close() then
  writeln('Closed the Hero screen');