# GrandExchangeHistory Methods to interact with the GrandExchangeHistory interface: ```{figure} ../../images/geh_interface.png ``` The {ref}`GrandExchange` is a very complex interface, probably the most complex available in OldSchool RuneScape and for that reason, the functionality to fully interact with it is split into multiple files and records: - {ref}`GrandExchange`, the main grand exchange screen. - {ref}`GrandExchangeHistory`, the history screen of the grand exchange and what this page is about. - {ref}`GrandExchangeChat`, the chat interface of the grand exchange when you are setting up a buy offer. - {ref}`GrandExchangeOffer`, the screen of the grand exchange where you view or setup a new offer. - - - ## TRSGrandExchangeHistory Record responsible to handle the {ref}`GrandExchangeHistory` interface. - - - ## GrandExchangeHistory.SetupInterface ```pascal procedure TRSGrandExchangeHistory.SetupInterface(); ``` Internal method used to setup the {ref}`TRSGrandExchangeHistory` coordinates. This is automatically called for you on the {ref}`GrandExchangeHistory variable`. - - - ## GrandExchangeHistory.IsOpen ```pascal function TRSGrandExchangeHistory.IsOpen(): Boolean; ``` Returns true if the Grand Exchange is open. Example: ```pascal WriteLn GrandExchangeHistory.IsOpen(); ``` - - - ## GrandExchangeHistory.WaitOpen ```pascal function TRSGrandExchangeHistory.WaitOpen(time: Integer; interval: Integer = -1): Boolean; ``` Returns true if the Grand Exchange is open within `time` milliseconds. ## Example: ```pascal WriteLn GrandExchangeHistory.WaitOpen(); ``` - - - ## GrandExchangeHistory.Close ```pascal function TRSGrandExchangeHistory.Close(escape: Boolean): Boolean; function TRSGrandExchangeHistory.Close(escapeProbability: Single = 0): Boolean; overload; ``` Closes the GrandExchangeHistory, Depending on `escape` or `escapeProbability the function will either click the button or press escape key. Example: ```pascal WriteLn GrandExchangeHistory.Close(); ``` - - - ## GrandExchangeHistory.Slots ```pascal property TRSGrandExchangeHistory.Slots: TBoxArray; ``` Returns the slot boxes of the {ref}`GrandExchangeHistory` interface. Example: ```pascal {$I WaspLib/osrs.simba} begin while True do ShowOnTarget(GrandExchangeHistory.Slots); end. ``` ```{figure} ../../images/geh_slots.gif ``` - - - ## GrandExchangeHistory.Open ```pascal function TRSGrandExchangeHistory.Open(): Boolean; ``` Attempts to open the {ref}`GrandExchangeHistory`, returns `True` on success. Example: ```pascal WriteLn GrandExchangeHistory.Open(); ``` - - - ## GrandExchangeHistory.Back ```pascal function TRSGrandExchangeHistory.Back(): Boolean; ``` Attempts to click the back button: to return to the main Grand Exchange interface, returns `True` on success. Example: ```pascal WriteLn GrandExchangeHistory.Back(); ``` - - - ## GrandExchangeHistory variable Global {ref}`TRSGrandExchangeHistory` variable.