ctrx_get_bitmap_value
Example | Information Retrieval Functions |
Returns the value of a bitmap as a string.
int ctrx_get_bitmap_value( long x_start, long y_start, long width, long height, char *buffer, [filename,] [CONTINUE_ON_ERROR,] CTRX_LAST );
x_start | The horizontal distance of the left edge of the bitmap from the edge of the ICA client window |
y_start | The vertical distance of the top edge of the bitmap from the edge of the ICA client window |
width | The width of the bitmap, in pixels |
height | The height of the bitmap, in pixels |
buffer | The output parameter containing the hashed string representing the bitmap value |
filename | The name of the bitmap file containing a screen shot of the window. This file is located in the script directory under data/bitmap/. |
CONTINUE_ON_ERROR | A constant, entered as shown without quotes. Overrides the error behavior runtime setting for this step so that script behaves as though the runtime setting was Continue on error. |
CTRX_LAST | A marker that indicates the end of the argument list. |
Use ctrx_get_bitmap_value to retrieve the hashed string value of a bitmap for use in your custom synchronization functions. The coordinates of the bitmap are specified in the first four parameters.
buffer is usually about 32 characters long. It is up to the user to allocate memory space for buffer before ctrx_get_bitmap_value is invoked, and to de-allocate the memory after it.
Return Values
Parameterization
No parameterization is available for this function.
Example
The following code snippet uses ctrx_get_bitmap in custom synchronization code. A while loop waits for a bitmap with a specified hash string to appear. When the bitmap appears, the code exits the loop.
char buffer[50];
int ReadyFlag = 0;
ctrx_mouse_double_click(52, 265, LEFT_BUTTON, 0, NULL, CTRX_LAST );
while(!ReadyFlag) {
ctrx_get_bitmap_value(35, 120, 30, 50, buffer, CTRX_LAST );
if(!strcmp(buffer, "0dd68052ce0bbcb7e8f3914471e89004"))
ReadyFlag = 1;
else
Sleep(20);
}