# BankPin Methods to interact with the bank pin interface. ```{figure} ../../images/bankpin_interface.png ``` - - - ## TRSBankPin Main record to interact with the {ref}`BankPin` interface. - - - ## BankPin.SetupInterface ```pascal procedure TRSBankPin.SetupInterface(); ``` Internal method used to setup the {ref}`TRSBankPin` coordinates. This is automatically called for you on the {ref}`BankPin variable`. - - - ## BankPin.IsOpen ```pascal function TRSBankPin.IsOpen(): Boolean; ``` Returns true if the bank pin is open. Example: ```pascal WriteLn BankPin.IsOpen(); ``` - - - ## BankPin.WaitOpen ```pascal function TRSBankPin.WaitOpen(time: Integer = 600; interval: Integer = -1): Boolean; ``` Returns true if the bank pin opens within `time` milliseconds.. Example: ```pascal WriteLn BankPin.WaitOpen(); ``` - - - ## BankPin.IsLoading ```pascal function TRSBankPin.IsLoading(): Boolean; ``` Returns true if the bank pin is loading. The bank pin is loading when the interface is open but the pin numbers are not available yet. Example: ```pascal WriteLn BankPin.IsLoading(); ``` - - - ## BankPin.WaitLoading ```pascal function TRSBankPin.WaitLoading(time: Integer = 600; interval: Integer = -1): Boolean; ``` Returns true if the bank pin finishes loading within `time` milliseconds.. For more information on bank pin loading read {ref}`BankPin.IsLoading`. Example: ```pascal WriteLn BankPin.WaitLoading(); ``` - - - ## BankPin.FindDigit ```pascal function TRSBankPin.FindDigit(digit: Char): Integer; ``` Finds a bank pin digit. Example: ```pascal WriteLn BankPin.FindDigit('5'); ``` - - - ## BankPin.ClickDigit ```pascal function TRSBankPin.ClickDigit(digit: Char): Boolean; ``` Finds a digit with {ref}`BankPin.FindDigit` and clicks it if it was found. Example: ```pascal WriteLn BankPin.ClickDigit('5'); ``` - - - ## BankPin.GetDigitIndex ```pascal function TRSBankPin.GetDigitIndex(): Integer; ``` Returns the index of the next digit to enter. Example: ```pascal WriteLn BankPin.GetDigitIndex(); ``` - - - ## BankPin.Enter ```pascal function TRSBankPin.Enter(pin: String): Boolean; ``` Handles entering the bank pin. Will do 4 attempts before terminating with a fatal error. Example: ```pascal BankPin.Enter('0000'); ``` - - - ## BankPin variable Global {ref}`TRSBankPin` variable.