Added functions sendmessage and postmessage .
The function sendmessage sends the specified message to the window or windows. The function calls the window procedure for the specified window and does not return a value until the window procedure has processed the message.
The function postmessage puts (inserts into the queue) a message into the message queue associated with the thread that created the specified window and returns a value without waiting for the thread that processes the message.
Use to send other windows any windows messages.
syntax
sendmessage (WM_HSCROLL, 3, 0, w);
postmessage (WM_HSCROLL, 3, 0, w);
The first parameter is a message. See the list on the Internet. You can specify a constant or a number int corresponding to this constant.
The second parameter is an additional information that specifies the message (if necessary). Constant or number.
The third parameter is an additional message that specifies the message (if necessary) a constant or a number.
The fourth parameter is a pointer to the window where to send the message.
Example of scrolling in a notebook, here you need additional information in the second parameter:
6 Scroll to far to the left.
8 Final scrolling.
0 Left Scrolling.
1 Scroll right.
2 Leave one page to the left.
3 Leave one page right.
7 Scrolling is far away to the right.
4 Scroll to the absolute position.
5 Drag the slider to a specific position.
CODE: win w=window (-1, "Edit", window ("Untitled", "Notepad", -1));
sendmessage (WM_HSCROLL, 3, 0, w); // horizontally to the right of the page
sendmessage (WM_VSCROLL, 3, 0, w); // vertically to the right to the page
Example of calculator closing:
CODE: win w=window ("Calculator", "CalcFrame", -1);
sendmessage (WM_CLOSE, 0, 0, w);
Example of typing in a notebook:
CODE: postmessage (WM_CHAR, 90, 0, w); // send z to the folded notepad .. http://filesd.net/kibor/codekeys.php Key Codes
An example of a joke, removes button 5 from the calculator win 7)
CODE: win w=window (-1, "Button", 50, 161, -1, -1, window ("Calculator", "CalcFrame", -1));
sendmessage (WM_CLOSE, 0, 0, w);
If writes that the first parameter is not defined - write, I will add. Just first check or not.
----- The Visual Code Editor is Kibor. Creating bots without knowledge of programming.
Learning function for recognizing text.
----- |