Browser and Office Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Browser and Office (Acc.-Engine) >

Browser and Office Commands

GAI. - Get-Accessible-Information

Previous Top Next


MiniRobotLanguage (MRL)

 

GAI. Command

Get accessible information

 

 

Intention

 

This command read information from the actual selected point/object. This can be for example a text in a window or browser or office-program.

 

Technically it reads accessible information from the Screen Objects at the Actual Point.

It can be the state of a element, or its size (location).

It will also return the position of the actual point if the prototype "p" is specified.

 

GAI. is slower then CFW but it may return more Details and can read also where CFW. might not.

 

Internally GAI. calls MAP. which makes an separate call to MMV - Mouse MoVe., MPO. - Mouse-POsition move. or MAP - Move Active Point. obsolete.

 

In the easiest form, GAI. will read texts from a screen-position onto TOS.

In this example we read text from the Internet Explorer.

 

' In this case we had the page www.fa2.de open

' in the internet explorer. Change the window-title:

STW.t|internet

' and the SAO.-parameter to your needs

' SAO. locates a point in the IE window

SAO.nvw|google|http|40

' GAI. reads that point's texts

GAI.

' Now we gave the results on the stack

STS.DUMP

 

Now we find the results from GAI. on the TOS. Here:

 

graphic

 

 

These are the same values, that you can see in the windows-inspector in the editor, when the mouse is exactly at that place.

 

graphic

 

 

 

Next, you can use GAI. with parameters to get the values directly into variables.

 

 

 

Syntax

 

 

GAI.P1|P2[|P3]...[|PX]

 

 

Parameter Explanation

 

Px - (optional) l,n,p,r,s,v -  output-prototypes

    Output variables according to prototype(s)

 

l - Get Item Location, this will result in a RECT with the

    item-Coordinates

n - Get the Item Name. Text result.

p - Position, this will return the (x,y) from the Actual Point-

    Position which was used for the Operation. You get a

    point-variable-result.

r - Get Element "Role".  Numeric result.

s - Get Element State. Numeric result.

v - Get Element Value. Text (or numeric) result.

 

 

 

 

Example

 

'*******************************************************

' Example 1 GAI.

'*******************************************************

LBR.Size=1024,980|Pos=0,0|svf=0|Site=www.fa2.de

WBR.

CBR.gw.

AGR.40||powerbasi

MMV.

GAI.v|$$LNK

DBP.$$LNK

 

'*******************************************************

' Example 2 GAI.

'*******************************************************

EXS.iexplore|www.fa2.de

PAU.3

STW.t|theo gott

SWP.|600,600

SAO.nvw|google|http|40

GAI.

' Now we take it from the stack and display it each

' Note that we use $$001 twice because once its touched,

' its taken from the stack!

DBP.Name: $$001-- Value:$$001

MBX.Ready

' Here we close the IE

GCT.

CLW.

ENR.

 

'*******************************************************

' Example 3 GAI.

'*******************************************************

' We open a Browser-Window and search for the Google-Logo

EXS.iexplore|www.fa2.de

PAU.3

STW.t|theo gott

SWP.|600,600

SAO.nvw|google|http|40

' GAI. - Example 1

' This will put Value and Name on the TOS

GAI.

' Now we take it from the stack and display it each

DBP.Name: $$001-- Value:$$001

 

' GAI. - Example 2

' This will get the state into the given Variable

GAI.$$STA

' Now we take it from the stack and diplay it each

PRT. The state of the Element at this place is: $$STA

 

' GAI. - Example 3

' Normal use, with prototypes

' This time we will put Value and Location into variable

GAI.vl|§§VAL|§§LOC

' Now we display it each

PRT.Value: §§VAL. Location:§§LOC

 

' GAI. - Example 3

' Normal use, with prototypes

' This time we will get Position (actual Point), Location and State

GAI.pls|§§POS|§§LOC|§§STA

' Now we display it each

PRT.-----------------------

PRT. Actual Point: §§POS

PRT. Location:§§LOC.

PRT. State: §§STA

PRT.-----------------------

MBX.Ready

END.

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

    CFW. - Copy-From-Window

    SAO. - Search Accessible Object

    AFT. - Acc.- Find Text

    AGR. - Accessibility Get Rect

    ! NAV. - NAVigate in Dialog