Sign in to follow this  
Followers 0
BryanSavon

Sending keys to minimised window

6 posts in this topic

Hi,

I want to send text to a minimized notepad window.

Why? Because I want to send debug info to it.

I have already spent a huge amount of time looking through these forums so I already know some options:

  • activate the window then use the send command to 'send' text to it and then deactivate the window
  • write to a flat file instead
  • make a new GUI / list for this purpose
However dumping the messages into notepad to be much more convenient.

Note

  • I cannot really activate the notepad window to push text to it ... some of my applications would notice this and react to it :D
  • I have tried the _sendmessage function and have not been able to get it to work :D :D
If someone who has done this before ... could they be very kind, to a someone who is frustrated, and post a very simple example (e.g. send a single character of text)

Thanks in advance

Bryan

Share this post


Link to post
Share on other sites



OK - think I have got the first bit if the answer already ...

Sending text to the notepad window is meaningless ... I need to send text to the control within the notepad window (i.e. Edit1)???

Am I right? In which case - how do I find the Edit1 control handle?

Share this post


Link to post
Share on other sites

OK - think I have got the first bit if the answer already ...

Sending text to the notepad window is meaningless ... I need to send text to the control within the notepad window (i.e. Edit1)???

Am I right? In which case - how do I find the Edit1 control handle?

You can get the handle with ControlGetHandle(), but you could just pass the ClassNameNN "Edit1":
ControlSend("My Notepad Window Title", "", "Edit1", "Some text...")

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Thank You .. Really You Helped Me Sooo Much ... i love Autoit And His Users... :)

Share this post


Link to post
Share on other sites

Here is what I did to overcome that, because notepad seems to be one of the few things that accepts keystrokes if the window is minimized

http://www.autoitscript.com/forum/index.php?showtopic=103163&st=0&p=731203&fromsearch=1&#entry731203

Hi,

I want to send text to a minimized notepad window.

Why? Because I want to send debug info to it.

I have already spent a huge amount of time looking through these forums so I already know some options:

  • activate the window then use the send command to 'send' text to it and then deactivate the window
  • write to a flat file instead
  • make a new GUI / list for this purpose
However dumping the messages into notepad to be much more convenient.

Note

  • I cannot really activate the notepad window to push text to it ... some of my applications would notice this and react to it :)
  • I have tried the _sendmessage function and have not been able to get it to work :):P
If someone who has done this before ... could they be very kind, to a someone who is frustrated, and post a very simple example (e.g. send a single character of text)

Thanks in advance

Bryan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0