Hello!
If I focus the chat box of a chat client before minimizing it, could I then send text to it without focusing the client?
If it is possible, could you show me an example? Like sending "Hello!" to a chat client (chatclient.exe).
Thank you!
Sending text to a minimized window
Moderators: Dorian (MJT support), JRL
I don't have chat to test but to answer your question: When a window is minimized, it no longer has focus so as you have probably already found, you can't Send> text to it.
You might try the SetControlText> function. It can place text in a minimized Notepad window.
You might try the SetControlText> function. It can place text in a minimized Notepad window.
Code: Select all
Run>Notepad.exe
WaitWindowOpen>Untitled - Notepad
WindowAction>2,Untitled - Notepad
Input>SendData,Enter something to send to minimized Notepad
SetControlText>Untitled - Notepad,Edit,1,SendData
Thank you! It works!
I replaced the tile in your example with the chat window title, identified the class name using the View System Windows tool, set class instance to 2 since there were two classes with the same name and the chat box was the second.
The only question is how do I instruct the script to press "ENTER" so it actually sends the message? And if that's possible, could it be extended to inserting multiple lines (CTRL+ENTER)*?
*the chat window accepts and sends multiple lines.
I replaced the tile in your example with the chat window title, identified the class name using the View System Windows tool, set class instance to 2 since there were two classes with the same name and the chat box was the second.
The only question is how do I instruct the script to press "ENTER" so it actually sends the message? And if that's possible, could it be extended to inserting multiple lines (CTRL+ENTER)*?
*the chat window accepts and sends multiple lines.