Open topic with navigation
|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.
No parameterization is available for this function.
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.
int ReadyFlag = 0;
ctrx_mouse_double_click(52, 265, LEFT_BUTTON, 0, NULL, CTRX_LAST );
ctrx_get_bitmap_value(35, 120, 30, 50, buffer, CTRX_LAST );
ReadyFlag = 1;