ELF commands

 
 
 

Most ELF commands create and modify UI elements. The commands that create UI elements are named after the type of element that they create. They accept optional flags with arguments and also accept as a final argument the name that you want to assign to the element being created (See the Naming section). For example:

window -visible true -title "Test Window" TestWindow1;

ELF UI command flags are optional, however all flags default to a particular value. In the example above you will notice that the window does not contain a menu bar because the default value of the “-mb/menuBar” flag is false. ELF UI commands also have other modes where they are not creating new elements but changing or querying existing elements. If the flags “-e/edit”, “-q/query” or “-ex/exists” are used then the named element will be edited, queried or tested for existence. The following example will return the title of the window created above.

window -query -title TestWindow1;

For querying, no arguments are required for the flag. Only one flag may be queried at a time as only one result can be returned at a time. Multiple parameters can be specified with the edit flag, and the exists flag expects only the name of the element being tested.

window -edit -title "New Title" -maximizeButton false TestWindow1;
window -exists TestWindow1;

In almost all cases, to edit or query a UI element you need to know the name and exact type of element that you are working with. There are a couple of special commands that relax this restriction. The “control” command can work on any type of control and the “layout” command can work on any type of layout.