Full Member
Покинул форум
Сообщений всего: 160
Дата рег-ции: Дек. 2017
Репутация: 0
Карма 0
|
There was an opportunity to display text on the screen during program execution.
textout - Prints a string with the specified color in the specified screen coordinates. Being printed works in a separate thread and is always on top of all windows. An exception may be full screen mode of some games.
If no text is displayed, enable Aero ..
Syntax:
textout (0, 100, 50, "text", 0);
textout (1, 100, 70, "text1" + format (5), 0);
textout (2, 100, 90, "text2", 0);
....
textout (3, 100, 110, "text3", 1);
textout (4, 100, 50, "text4", 2);
..........
The first parameter is the message number. Numbered from 0 to 9999. This number can then be updated.
The second is the X position from the top left corner.
The third is the Y position from the top left corner.
Coordinates are screen.
The fourth is text in string or char
The fifth one can be 0 or 1 or 2.
0 - Being printed when changing the length of a line to a smaller or shifting position of this text does not update the screen behind it.
1 - When changing the length or position, it updates the part of the screen on the object on which it is printed.
2 - When changing the length or position, updates the entire screen.
If text information is displayed on the desktop, use 1.
If you need to update other text with this text, which is displayed without an update (0), you need to register 2. Flicker is possible.
If infa is displayed for example in the game window - 0. is used. Since the game itself will erase the old line imprint from its screen when changing the length or position. Using 1 or 2 in this case will result in flicker.
textbkcolor -set the background color for the text and the text color:
textbkcolor (4227327,16711808);
The first parameter is the text color
The second is the background
By default, if the textbkcolor function is not called, it is printed in black and white.
enabletextout - Enables the display of text. Enabled by default.
Syntax
enabletextout ()
disabletextout - Disables the display of text. All entries are saved. just hide from the screen.
Syntax
disabletextout (1)
Options
0 - Disable the display. The screen does not update. The image may remain until the screen is refreshed.
1 - Disable the display. The screen refresh.
resettextout - Reset all labels. Reset all parameters. Color settings are set by default.
Syntax
resettextout (1)
Options
0 - Reset all captions. The screen does not update. The image may remain until the screen is refreshed.
1 - Reset all captions. The screen refresh.
The color can be changed for each output different:
CODE: textbkcolor (65535,8421376);
textout (0, 100, 100, "Line 1", 0);
textbkcolor (8421376.8388608);
textout (1, 100, 120, "Line 2. In 2 seconds will change", 0);
textout (2, 100, 140, "Line 3", 0);
textbkcolor (4194368, 32768);
textout (3, 100, 160, "Line 4", 0);
sleep (2000);
textbkcolor (255,4259584);
textout (1, 100, 120, "Line 2 has changed," 2);
sleep (1000);
int x, y;
textbkcolor (255.0);
a: getmouse (x, y);
textout (4, x + 20, y + 20, "x" + format (x) + "Y" + format (y) + "color" + format (getcolor (x, y)), 1);
sleep (10);
goto a;
----- The Visual Code Editor is Kibor. Creating bots without knowledge of programming.
Learning function for recognizing text.
----- |