Browser and Office Commands

<< Click to Display Table of Contents >>

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

Browser and Office Commands

AFT. / AFF. - Acc.- Find Text  (Search Text-Object)   

Previous Top Next


MiniRobotLanguage (MRL)

 

AFT. Command

Accessibility Find Text

AFF. Command

Accessibility Find Fast

 

 

Intention

 

These commands will search for a specified text in the given window. It was designed for most easy usage. You search a text?

AFT./ AFF. will search that text in that window.

AFT./ AFF. was made for easy usage. Just give the text to search for. Like in this example.

The only difference between AFT. and AFF. is, that AFF. uses multiple CPU-Cores.

This may lead to a SpeedUp under circumstances when AFT. is too slow.

If AFT. is fast enough, use AFT. because in this case AFF. may be slower then. If AFT, is too slow, try AFF. instead.

 

STW.ct|IEFrame|Theo Gottwald&ANDTHEN: - Windows Internet Explorer

AFT.|google&ANDTHEN:nwshp

MMV.

ENR.

 

You can specify a role-parameter, if you want. Like below.

 

STW.ct|IEFrame|Theo Gottwald&ANDTHEN: - Windows Internet Explorer

AFT.40,43|google&ANDTHEN:nwshp

MMV.

ENR.

 

But maybe you don't want in most cases, if your text is unique. If you want to click immediately on the found object, AFT. understands all "Inline Role-Parameters" (Subcommands) like AGR.

 

STW.ct|IEFrame|Theo Gottwald&ANDTHEN: - Windows Internet Explorer

' This will immediately click the link.

AFT.!MOS.|google&ANDTHEN:nwshp

ENR.

 

If the target application is an Internet explorer, AFT. will scroll to bring the located object into the visible area.

 

Technically AFT. localizes a specified Acc.-Object in a Child-Window or Top-Window and sets the actual point into the object center. It's similar to AGR. but it does not separate the value and the name parameter. They are both treated as "Text".

 

Additionally you can specify a number, if there are multiple objects that fit your textual description, and you prefer to not take the first one. If you omit the number the default is 1. Means that you will get the first object that fits your description.

 

AFT. supports the use of so called "Role-Parameter". These are Inline-Subcommands which get executed only if the object could be found. Here is an example:

 

' The "Inline MOS." will select the Link in the IE

AFT.!MOS.|google&ANDTHEN:nwshp

 

For a complete list of all "Role-Parameters" see below.

 

You can see Acc-Objects in the Acc.-Inspector.Let us see an example from a WEB-Site in the Internet Explorer:

 

graphic

 

In the picture below you will see the resulting Display in the Acc.-Inspector.

 

graphic

 

The most important parameters for AFT. are:

"text" and  "role". In most cases you can even ignore the role parameter and just use "text".

 

Now we'll take the above picture from the Acc.-Analyzer, and make the code for it.

 

Using AFT. we do best locate a Top- and a child-window. Like this:

 

STW.ct|IEFrame|Theo Gottwald&ANDTHEN: - Windows Internet Explorer

SCW.ct|Shell DocObject View|{&NOTEXT:}

AFT.40|google&ANDTHEN:nwshp

MMV.

ENR.

 

In some cases this may not be possible, or will not work. Then we can use AFT. just on the Top-Window:

 

STW.ct|IEFrame|Theo Gottwald&ANDTHEN: - Windows Internet Explorer

AFT.40|google&ANDTHEN:nwshp

MMV.

ENR.

 

Which may be a bit slower in execution times, depending on the overall complexity of the WEB-/Office program.

 

 

 

Hints:

It is important, that you localize a window before using AFT.

 

Unlike SAO., AFT. does not use the 1.4. The Prototype Parameter System.

 

AFT. supports 3.2 Standard-Search Pattern and they can help you to better define the things you look for. See example above "google&ANDTHEN:nwshp".

 

Please note that AFT. can be quite slow when being used on complex applications and slow Computers.

 

Use the Acc.-Inspector in the Editor to get the necessary parameter data.

 

AFF.

 

We have implemented an (undocumented) experimental) version of AFT., called AFF. Unlike AFT., AFF. uses multilpe CPU-cores to speed things up. It will not scroll the IE, and the "Nr." parameter may not work as expected (which is due to the fact that we can not predict, which core finds what element first). It may however be faster in complex cases then AFT. AFF. is experimental, Use it with caution.

 

 

 

Syntax

 

AFT.[P1][|P2...|Px]

AFF.[P1][|P2...|Px]

 

 

Parameter Explanation

 

P1 - (optional) Role, and Role-Parameter, a numeric value as you it in the Acc.-Inspector, when you are over the element with the mouse. You can specify additional "Subcommands" after the Role-Parameter* (See below), separated by a "!". Example:

 

AFT.40!WII.MLE.|google&ANDTHEN:nwshp

 

P2 - (optional) Text, a string / text as you it in the Acc.-Inspector, when you are over the element with the mouse. "Text" can be the "Value" as well as the "Name".

 

P3 - (optional) Number of the element. There may be multiple elements that fit your description. In that case you can choose which one you want using this parameter. You need to try which number you need to locate the element of your choice.

 

P4 - (optional) Flags. A numeric value that is a combination of the below numbers.

 

    1 - only Objects,

    2 - only Simple Elements

    4 - display debug info while searching.

 

while all parameters are marked as "optional", you need to specify some of them. An empty AGR. does not make any sense.

 

 

*Role-Parameter:

You can specify multiple Roles, they must be separated by ",".
Any of these will be valid.
 
If you specify a "#" before the Role-Parameter, it will mean "Role-Group" and specifies any of the following:

0: unknown

1: User-bedienbare Controls

2: Panels, Client und Background

4: Borders etc.

8: Window-Controls (Titlebar, Minimize etc.)

16: Scrollbars

32: Spezial, Cursor, Sound etc.

These inline-commands can be specified together with the role-parameter, separated by a "!". You can specify as man of them as you wish. They will only get executed, in case of an element is found:

 

"TAF" - "a" ' Take Focus

"TAS" - "b" ' Take Selection

"ESE" - "c" ' Ext. Select

"ASE" - "d" ' Add to Selection

"RSE" - "e" ' Remove Selection

"SSE" - "f" ' Strong Select

"SHC" - "g" ' Shift-Click

"CCS" - "h" ' ctrl-click - select

"CSE" - "i" ' ctrl-click cancel selection

"MER" - "j" ' MER at Pos.

"MSE" - "k" ' do Multiselect

"MOS" - "m" ' Mouseless Operation Select

"DMO" - "n" ' Double Mouseless Operation Select

"MLI" - "o" ' MLI at place

"DMR" - "p" ' Double Mouseless Operation Select with rest

"MPO" - "q" ' Mousepointer Position Set

"MSO" - "r" ' Mouse Operation

"MDO" - "s" ' Mouse Double Operation

"WIN" - "t" ' Set Wait-Input Idle- Time to infinte

"MDC" - "u" ' MDC at place

"MRC" - "v" ' MRC at place

"WII" - "w" ' Wait-for-Input-Idle (max. 5 Seconds)

"MLE" - "x" ' MLE.

"SMP" - "y" ' Set Mousepos Mode

"BTP" - "z" ' Set Left-ControlPosition like for Checkmark

"BTC" - "0" ' check State before click and click

              if actually state=0 (check it)

"BTS" - "1" ' check State before click and click if actually

              state=1 (uncheck it)  

 

 

 

 

Example

 

' This Example will find an item in the Internet Explorer

' on a WEB-Site

STW.ct|IEFrame|Theo Gottwald&ANDTHEN: - Windows Internet Explorer

SCW.ct|Shell DocObject View|{&NOTEXT:}

AGR.40||google&ANDTHEN:nwshp|1|64

MMV.

ENR.

 

 

 

Remarks

 

-

 

 

 

Limitations:

 

This command can be slow on complex applications.

 

 

 

See also:

 

    !. NAV - NAVigate in Dialog

    MOS. - Mouseless Object Select

    GAI. - Get-Acc-Information

    SAO. - Search Accessible Object

    AGR. - Accessibility Get Rect