Control specific operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Control specific operations >

Control specific operations

LVI. - ListView Command

Previous Top Next


MiniRobotLanguage (MRL)

 

LVI. Command

ListView32 Command

 

Direct Engine_01

 

Intention

 

These command will select a Listview item. A Listview is a special type of control and may look like this (Listview in Report-Mode):

 

graphic

 

Listviews that are not in Report-Mode may show Icons for the elements they contain:

 

graphic

 

The desktop is also a Listview Control, and it shows Icons.

Therefore the LVI.-Command can also be applied on the Windows Desktop.

 

Using LVI. you can locate Items in a Listview by their numeric position, or using a textual description. If you use a textual description, 3.2 Standard-Search Pattern can be used.

 

Depending on the SubCommand, LVI. has multiple purposes.

 

 

 

 

 

Syntax

 

LVI.P1[.OPT][...|Px]

 

The Syntax depends on the used Subcommands:

 

Parameter Explanation

 

P1 - Subcommand, is one of the following Subcommands:

 

     Find a Listview Item by name, locate center of text area (and navigate)

  "ftbn","find text by name"

   This Subcommand finds a Listview Item using a Substring of the Text that it contains.

      3.2 Standard-Search Pattern can be used.

    The item will be located, you will find Information about the item on the TOS.

 

' Using this example, the TOS looksl ike this:

LVI.ftbn.unc|thre

 

graphic

 

   LVI.ftbn|P2|P3|P4|P5  

 

   P2 - Text textual Pattern you want to search for

   P3 - (optional) Number of occurrence

   P4 - (optional) Navigate X by Steps

   P5 - (optional) Navigate Y by Steps

       using P4 and P5, you can find a specified Item and then navigate from there in X-

       or Y-direction to another item.

 

      Examples:

     LVI.ftbn|Earth

     LVI.ftbn|Ear&OR:Mar

     LVI.ftbn.mlm|Earth

     LVI.ftbn|Earth||1

 

     Find a Listview Item by name, locate Icon area (and navigate)

  "fibn","find icon by name"

   This Subcommand finds a Listview Item using a Substring of the Text that it contains.

        It will locate the Icon Area to the left instead of the Text-Area.

      3.2 Standard-Search Pattern can be used.

       The item will be located, you will find Information about the item on the TOS.

 

  LVI.fibn|P2|P3|P4|P5

 

   P2 - Text textual Pattern you want to search for

   P3 - (optional) Number of occurrence

   P4 - (optional) Navigate X by Steps

   P5 - (optional) Navigate Y by Steps

       using P4 and P5, you can find a specified Item and then navigate from there in X-

       or Y-direction to another item.

 

      Examples:

     LVI.fibn|Earth

     LVI.fibn|Ear&OR:Mar

     LVI.fibn.mlm|Earth

     LVI.fibn.chk|Earth

     LVI.fibn|Earth||1

 

 

Find a Listview Item by number

 

"fbn","find by number"

 

  This Subcommand finds a Listview Item using numerical coordinates.

     You can specify an X- (Row) and an Y- (Column).

     Both numbers are 1-based.

     The item will be located, you will find Information about the item on the TOS.

 

   000  Column-Number or zero

   001  Row-Number, 1- based

   002 Name if item that was found

 

 

graphic

 

      Examples:

    ' Locate 4'th item in a single column LV

     LVI.fbn|4

     ' Locate 4'th item in the second row of a multi-column LV

     LVI.fbn|4|2

     ' Locate the first item and check the checkmark

     LVI.fbn.chk|1

 

 

 

Get number of Items, number of columns, Listview-Style number and Unicode

Information

 

  "gin","get info"

 

  This Subcommand will retrieve needed informations about the Listview. You can omit

  parameters that you do not need. In that case these values are placed on the TOS.

 

LVI.get info|P2|P3|$$STL|$$UNI

 

  The first Variable P2 receives the number of Lines thats in the Listview (Line-Count).

  Variable P3 receives the number of Columns if the Listview has more then one.

  Variable P4 receives the Listview Style value. This is for advanced use only.

  Variable P5 receives 0 or 1 if the Listview is a Unicode Control (1) or an ANSI Control (0).

  There is a Unicode conversion built in. Some Listviews are marked as Unicode and are

  not used as such, in this case you may get "??????" as textual result.

  You can then use the "Force Unicode" Subcommand to set this Flag to 0 and make the

   Control readable.

 

  LVI.get info|$$TAY|$$TAX|$$STL|$$UNI

 

Set the text of the selected item to another text / change text

 

"sit","set item text"

 

You can change the text of an item using this command.

 

  LVI.sit|TY|TX|Text  

 

 

Unselect all Items in the Listview

 

  "usa","unselect all items"

 

   This will unselect all selected items in the Listview.

   Depending on the Listview, some Listviews may not support this command.

 

 

Select all Items in the Listview

 

  "sai","select all items"

 

   This will select all items in the Listview.

   Depending on the Listview, some Listviews may not support this command.

 

 

Cancel Edit Mode

 

  "nedi","cancel edit label"

 

Set the Unicode Flag of the Listview

 

  "funi","force unicode"

 

    You can set the unicode flag of the Listview to 0 or to 1.

    This will influence the way that the text is internally interpreted, at least under x32.

    Sometimes Controls are marked as Unicode but are not used as that.

    In that case you may receive textual results like ?????? ??? and nothing is found.

    If so, set the unicode flag to zero using this command before using other LVI. commands.

 

 

Fake Unicode processing

 

  "fauni","fake unicode"

 

    This will influence the way that the text is internally interpreted, at least under x32.

    It will not physically change the Unicode flag inside the Control.

    It will only change the way, all further LVI.-Commands process the Text.

    This currently has only an effect under x32 Applications.

 

 

.OPT - You can add one or more of these Options to any of the Subcommands.

              Then the selected Options will be used on the Target-Listview-Item.

              Possible Options are:

 

.lbo - Move Actual Point to Left Border for all later commands

.rbo - Move Actual Point to Right Border for all later commands

.foc - focus item

.sel - select item

.chk - check a checkamrk on that item

.unc - uncheck a checkamrk on that item

.vse - Enshure visible + select Item

.usa - unselect all items

.ndi - cancel Item-Text editing

.edi - Start Item-Text Editing

.upd - Update/Redraw Listview Control

.uns - unselect this item

.del - delete Item from Listview

.wii - Wait for Input Idle

 

The following Options are not available as .OPT under x64.

Just use the normal SPR Commands (MLE.,MLM. etc. instead).

Also note that these clicks always hit the item-Center, even if you have specified .lbo or .rbo.

 

.mle - Direct Engine Click

.mli - do a compatible Click

.mdc - do a Double Click

.mlm - do a MLM-Click

.clr - do not do any selection, this will clear all other .OPT Flags

               

 

 

Example

 

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

' LVI.-Sample

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

' If no such item as specified is found,

' the timeout-flag is neen set.

' You can check that using the ITO-Query.

'

STW.ct|#32770|item

SCW.nc|1|SysListView32

LVI.ftbn.unc|threx

ITO.

 MBX.No such item was found

EIF.

MMV.

STS.DUMP

MBX.!

ENR.

 

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

 

 

 

Remarks

 

On the stack, you can find the name of the selected element.

This useful, if it was selected using a Pattern.

 

The command has internally a different path for x32 and x64 applications.

Some features may not do exactly the same under x64 and x32.

Also some features may not work under both types of OS.      

 

 

 

Limitations:

 

Some features may not work under x64, in th3e same way as they do under x32.

 

 

 

See also:

 

  TVI. - Tree View Invisible

  GBC. - Get-Button-Check

  BTC. - Button-Check