Image/Pixel-Color Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Image/Pixel-Color Operations >

Image/Pixel-Color Operations

Smart Package Robot 's Pixel Operations

Previous Top Next


 

Smart Package Robot 's Pixel Operations

 

graphic

 

Pixel-Operations can be used as last choice, if no other command can give you needed information on these topics:

 

    Did something in the dialog change? (WRA.)

    Is the button i need already available?

    Is the form ready to accept input?

    Or you can simply use it to take a Snapshot, for example under Error-conditions, to see what was going on (CAP.).

 

Pixel-Operations are most often the last choice, if all other commands fail to read the window content. The reasons are simple:

 

    Colors may differ from system to system

    coordinates may differ depending on screen dpi-settings and resolution

 

To make Pixel Operations as compatible as possible, you can use two special tools, provided here:

 

    Instead of "real colors" you can use the "System Colors" S1-S30. They are calculated on each system to their color-value. This way your color values will be independent from themes and settings. See here 3.4 System-Colors

    Instead of coordinates prefer using RECTs {A1} to {D4}.

For Details see 3.6 Using Quadrant-Coordinates

 

Important:

All Pixel-Operations are "Compatible Engine" Operations.

 

For Details see here:

1.C Direct Engine and Compatible Engine

 

 

Often with Pixel-Operations, you need to see single Pixels.

You can use the "Catseye-Analyzer" to find coordinates and color values.

The Catseye-Analyzer is located in the Installation Folder of the SPR.

 

graphic

 

 

Important note on Color-Depth.

In the actual Computers, we use 24 bit colors and this is what the Robot uses for its Pixel-commands. For Speed Reasons, no other Color-Depth is supported.

Using Pixel-Commands on other Color-Depth then 24 bit will lead to undefined Results.

 

Color-Values:

Color Values are decimal, integer numbers in the Range from 0 to 16777215.

In Hexadecimal Notation this is 0 to &H FF FF FF.

 

If you write the Color-Number in Hexadecimal Notation, you can see the

Red-, Green-, and Blue-Part of the specified Color side-by-side.

The decimal notation does not have this feature, that is why we recommend that you use the hexadecimal numbers.

Technically there is no difference which notation you use, because the system will anyway convert it to Binary before execution.

 

 

 

 

Example using Google Chrome-Browser. In this Example, we have a Search WEB-Site with a background color of &HF6F6F6

Using this simple Script, we can locate the Input Box and move the Mouse there..

 

' https://duckduckgo.com/

STW.ct|Chrome_WidgetWin_1|DuckDuckGo Search Engine - Google Chrome

IRC.c|!&HF6F6F6

  VAR.$$TAR=$$000,$$000

  MMV.$$TAR   

EIF.

ENR.

 

 

Another Example using Google Chrome-Browser. In this Example, we have a Search WEB-Site with a background color of &HF6F6F6

Using this simple Script, we can locate the Input Box and move the Mouse there..Note the DMP.6 that will show the result of the IRC.-Command.

 

STW.ct|Chrome_WidgetWin_1|DuckDuckGo Search Engine - Google Chrome

IRC.c|&HFFFFFF

  DMP.6

  MBX.!

  VAR.$$TAR=$$000,$$000

  MMV.$$TAR   

EIF.

ENR.

 

 

 

Here are some Color-Values in Hexadecimal notation.

 

graphic