Finished the function visualwindow.
Now it can display the image stored in a two-dimensional array int.
This array can be filled programmatically (draw) or read from a file.
Display the image of the image stored in the Image_0 array
CODE: visualwindow (0, 0, 0, imagewidth (# Image_0 [0] [0]), imageheight (# Image_0 [0] [0]), 100, 120, 100, # Image_0 [0] [0]) ;
Example of drawing a line on button 5 in the calculator
Цитата: int Image_0 [34] [27];
win w=window ("Calculator", "CalcFrame", -1); // Pointer to the calculator
// These data were obtained in a spy
int RX=34, RY=27; // Button size 5
int X1=50, Y1=161; // Position of the button 5 in the calculator window (upper left corner)
int X2=X1 + RX, Y2=Y1 + RY; // Position of the button 5 in the calculator window (bottom right corner)
pause (1000);
visualwindow (0, 0, 0, RX, RY, w.leftclient + X1, w.topclient + Y1, 100, # Image_0 [0] [0]); // enable the output of Image_0 in the place of the button on the screen
loop ()
{
screen (# Image_0 [0] [0], X1, Y1, X2, Y2, w); // Get a snapshot of button 5 in the calculator window and recorded in Image_0
for (int x=0; x
sleep (10);
}
Example of displaying an image from a file
Цитата: int Image_0 [300] [200];
loadimage (# Image_0 [0] [0], "C:\Image_0.bmp");
// included the output of the entire Image_0 image in coordinates 100, 120 of the screen without compression
visualwindow (0, 0, 0, imagewidth (# Image_0 [0] [0]), imageheight (# Image_0 [0] [0]), 100, 120, 100, # Image_0 [0] [0]);
// included the output of the middle of the Image_0 image (50, 70, 250, 150) in coordinates 100, 350 of the screen, compressing it by 50 percent
visualwindow (1, 50, 70, 250, 150, 100, 350, 50, # Image_0 [0] [0]); // enabled the output of Image_0 at the location of the button on the screen
loop () sleep (10);
----- The Visual Code Editor is Kibor. Creating bots without knowledge of programming.
Learning function for recognizing text.
----- |