N
N
Noob_help_me_pls2022-02-26 17:47:38
C++ / C#
Noob_help_me_pls, 2022-02-26 17:47:38

How to make a program that displays text from a file in a chat in a browser?

Tell me how to make a program that displays the prepared text from a file in a chat in a browser.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
HemulGM, 2022-02-26
@Noob_help_me_pls

You put the focus in the chat and send from the side of the program keystrokes - a simulation of pressing.

Clipbrd.AsText := 'Hello';

keybd_event(Ord('H'), 0, KEYEVENTF_KEYDOWN, 0);
keybd_event(Ord('H'), 0, KEYEVENTF_KEYUP, 0);

keybd_event(Ord('e'), 0, KEYEVENTF_KEYDOWN, 0);
keybd_event(Ord('e'), 0, KEYEVENTF_KEYUP, 0);

keybd_event(Ord('l'), 0, KEYEVENTF_KEYDOWN, 0);
keybd_event(Ord('l'), 0, KEYEVENTF_KEYUP, 0);

keybd_event(Ord('l'), 0, KEYEVENTF_KEYDOWN, 0);
keybd_event(Ord('l'), 0, KEYEVENTF_KEYUP, 0);

keybd_event(Ord('o'), 0, KEYEVENTF_KEYDOWN, 0);
keybd_event(Ord('o'), 0, KEYEVENTF_KEYUP, 0);

keybd_event(VK_RETURN, 0, KEYEVENTF_KEYDOWN, 0);
keybd_event(VK_RETURN, 0, KEYEVENTF_KEYUP, 0);

The word "Hello" will be written and sent by simulating Enter
Pressing Or, putting text on the clipboard, simulating pressing Ctrl + V and Enter
keybd_event(VK_CTRL, 0, KEYEVENTF_KEYDOWN, 0);
keybd_event(Ord('V'), 0, KEYEVENTF_KEYDOWN, 0);

keybd_event(Ord('V'), 0, KEYEVENTF_KEYUP, 0);
keybd_event(VK_CTRL, 0, KEYEVENTF_KEYUP, 0);

keybd_event(VK_RETURN, 0, KEYEVENTF_KEYDOWN, 0);
keybd_event(VK_RETURN, 0, KEYEVENTF_KEYUP, 0);

C
calculator212, 2022-02-26
@calculator212

everything is simple, you read the text from the file, and then you enter it into the chat in the browser.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question