1. Starting Guide

<< Click to Display Table of Contents >>

Navigation:  1. Starting Guides >

1. Starting Guide

Direct Engine and Compatible Engine

Previous Top Next


Starting Guide

 

Direct Engine and Compatible Engine

What it is and what it is good for.

 

clip0564

The two engines: "direct engine" and "compatible engine".

 


 

Direct Engine_01Compatible Engine_01

When simulating Mouse and keyboard there are generally two ways  to do so. Most often we go the direct way and talk directly to the "Target-Application" or Setup-Program. We sent them a Message telling them "Hey App, you got a Mouse-Click.". Or "Hey App, there is a keyboard event for you.".

 

Direct and compatible Engine only have to do with simulating Mouse and Keyboard action. They have nothing to do with window or Element-Localisation.

 

This way we can work very efficient in simulating mouse and keyboard. Because the limit is just the speed in which the target application understands our messages. Here are some advantages of using the direct engine.

 

Fast execution, capable of sending multiple commands per second.

Can interact with invisible windows and disabled windows.

Can interact with windows that are behind other windows.

Does not require a physical mouse, keyboard, or desktop.

Enables the execution of scripts without a logged-on user.

Typing text is particularly fast with the Direct Engine.

 

About the speed, there are differences between the commands. Typing text is much faster then using other options. You may be able to fill ten or more text fields in a second using the direct engine.

 

The Direct Engine

 

graphic

 

 

But unfortunately, not all applications and Setup-programs are willing to talk with the robot directly. Few of them, will just not react on direct engine commands. In this case we need to do what a manual user would do. We need to use the mouse and the keyboard. As we are very compatible this way, this is called the

 

 

The Compatible Engine.

graphic

 

The Compatible Engine sends the mouse and keyboard simulations to windows. Just like you, when you use the mouse and the keyboard. Therefore it will work in all applications for sure*. However being compatible has disadvantages in terms of speed. Here is a list with the characteristics of the compatible Engine commands:

 

Sends mouse and keyboard simulations to windows, mimicking user actions.

Ensures compatibility with all applications.

Slower compared to the Direct Engine but faster than manual interaction.

Works on windows where the Direct Engine may not be effective.

Cannot interact with invisible or deactivated windows.

Requires a physical mouse, keyboard, and desktop.

Suitable for scripts that run when the user is logged on.

 

Please note that the choice between the Direct Engine and the Compatible Engine depends on the target application's responsiveness and compatibility.

In most cases, the Direct Engine provides faster and more efficient automation, but the Compatible Engine ensures broader compatibility across various applications.

 

 

And how do you select between the two engines?

 

That's easy. You just choose the right command. You will find on the help-page of each command a hint, which engine is used.

 

Some commands support only one of both engines. In this case there is another command that supports the other engine. Some commands support all of the two engines and you choose by giving a parameter which engine to use..

 

Let's test both engines so you get a feeling for the difference. First you should start the Test-Application in the "Sample Applications" Folder.

 

Then just run this script:

 

graphic

 

Here is what you see in the Test-Application:

 

graphicgraphic

 

The Button gets selected and the Application tell you that "Button 1" was pressed.

However you did not see the mouse do anything, right?

 

That is because the mouse is not involved when we use the direct engine. Now we change the program - just a bit. In fact we use the compatible Engine now. Look at the script.

 

The only change was that we have replaced the "MLE. (Mouse Left Event)" with a "MLC. (Mouse left Click)" command.

 

graphic

 

That is all. Now it uses the compatible engine. Start the script again. Now you see the Mouse-Pointer move to the "button 1". In the same way like if you had clicked it manually. Thats why its called "compatible". It's just like "If you do it yourself". Anyway, moving the Mouse around is a bit slow. There must be a faster way, which is still compatible. And that is called "MLI. (Mouse Left Click Invisible)".

 

Try it yourself and replace the MLC. with an MLI. and run the script again. The effect on the Test-App is the same. However its a compatible click, that will work very fast in most of all cases. In those very few cases, where MLI. will not work, you can use MLC. or you can try MLM (Mouse left Click Move).  And now we get to the next question:

 

How do i know which engine to choose?

 

The answer is simple. You have to try. There is no way to see or know it without trying. Record your setup using the InstaRec. Test your script from the Editor.

 

In most cases, its not the whole Setup, that does not react to the direct engine. That's very seldom. In most cases, its a control with settings, that needs the direct engine click.

 

    First thing to do is, record your script, using the direct engine.

    Test is slowly from the editor

    If you see that some clicks are not pressed, choose compatible clicks at these place

 

This is the way to do it. Here a short list with the most often used commands and a hint for the Engine:

 

MLE. - Direct Engine

MLI. - compatible Engine (faster then MLM.)

MLM. - compatible Engine (faster then MLC., more compatible then MLI.)

MLC. - compatible Engine (Most compatible)

 

SDT. - direct Engine

RST. - direct Engine

SKP. - compatible Engine

 

SCI. - direct engine

CDD. - compatible Engine

 

BTC. - 0/1 - direct Engine, 3,4 compatible Engine (Details see command)

 

TVI. / TVF. - direct Engine (depends on Options)

 

 

 

 

 

* There may be applications that defend actively against simulated mouse and keyboard input. In these cases. even the compatible engine may not work.