<< Click to Display Table of Contents >> Navigation: 3. Script Language > Browser and Office (Acc.-Engine) > Browser and Office Commands |
MiniRobotLanguage (MRL)
IBR. Conditional Statement
If Browser Event/ Site loaded
Intention
Using IBR. you can check until a Site had been completely loaded in the Mini-Browser (=MB). IBR. can also be used to check for several Browser Events or Errors.
For more details on the Mini-Browser (MB) see there.
IBR. is a multi-purpose command that includes multiple possible subcommands.
Like with all conditional statements, IBR. is used like this:
IBR.(parameter)
...(this is executed if the condition evaluates to True)
ELS.
...(this is executed if the condition evaluates to False
EIF.)
Here is an example:
LBR.Size=1024,980|Pos=0,0|svf=0|site=www.fa33.de
WBR.
IBR.Err.=2148270085
MBX.Browser reported Error
DBP. Err-Code: #mb_err#
CBR.errclear
CBR.exit
ELS.
MBX.Browser ended regularly
EIF.
ENR.
Below you will see more examples on how to check for Errors and loading Progress.
NBR. is the negative form of IBR.
Syntax
IBR.[P1]
Parameter Explanation
[!] - If you prefix the Subcommand P1 with a "!" then the Logic is negated and the given
condition is true, if its originally false.
P1 - Subcommand, the following Subcommands are currently supported:
• IBR. without any options is the same as IBR.all
IBR.
• "All" - wait until MB is ready with all Jobs
IBR.all
• "Page" - Wait until the actual Page has been loaded
IBR.Page
• "Job" - Wait until the actual Job is done
IBR.Job
The following Subcommands support Comparisons !,=,>,<
If you prefix these Subcommands with a "q" they will "confirm" any Error like if you had been using the command:
CBR.errclear
If you omit the "q" you will need to manually call
CBR.errclear
to clear internal Error Variables, and make them ready for the next Event.
• "Progress","Pro." - Compare actual loading Progress (0-100%)
IBR.Progress=progress value
IBR.Progress>0
IBR.Progress<19
IBR.Progress<19
• "Error","Err." - Compare actual loading Error State
IBR.Err.=0
IBR.Error>0
IBR.Error=0
IBR.Error!200
• "State","Sta." - Compare actual loading Error State as textual pattern
For this textual compare the sign is been ignored.
IBR.Sta.=HTTP&AND:Error
IBR.State=HTTPS&OR:Error
IBR.qState=HTTPS&OR:Error
• "Description","Des." - Compare loading State as textual pattern
For this textual compare the sign is been ignored.
IBR.Des.=HTTP&AND:Error
IBR.description=HTTPS&OR:Error
IBR.qDescription=HTTPS&OR:Error
cond - IBR. supports the following conditions:
! - NOT
= - Is Equal to
> - Larger then
< - Smaller then
Hint: Combined Operators like ">=" are not supported. In this case, just use ! and "<"
and switch the operators. Because A>=B is the same as NOT B<A.
Example
'##############################
' Sample 2
'##############################
LBR.Size=1024,980|Pos=0,0|svf=0|site=www.fa33.de
WBR.
IBR.Des.=was not found
DBP. Descr.: $mb_ert$
CBR.exit
ELS.
DBP.No error loading the site
EIF.
ENR.
'##############################
' Sample 2
'##############################
'
LBR.Size=1024,980|Pos=0,0|svf=0|site=www.fa2.de
:Retry
PAU..25
NBR.
GTO.Retry
EIF.
CBR.gw.
FOR.$$NUM|1|400
AGR.40|||$$NUM|||out
GAI.v|$$LNK
DBP.Der hinterlegte Link:$crlf$$$LNK
MMV.
NEX.
:out
MBX.Browser exit
CBR.exit
ENR.
Remarks
There are multiple examples on using the Mini-Browser within the supplied Sample Scripts. A list with possible Errors can be found here:
Internet Explorer Errors and here: HTTP-Status Codes
Limitations:
-
See also:
• ! Smart Package Robot 's Browser and Office Commands
• LBR. - Launch (Mini-)Browser