Jump to content

Sending text to a minimized window


Angel
 Share

Recommended Posts

Hi,

I have a program that I wish to control while it remains minimized. The program is Tera Term, a terminal program for serial ports. I wish to send commands to it by means of Send or ControlSend or a similar trick. I want to do it while the tool is minimize to avoid interfering with the GUI of my program.

The problem is that when I look at this window with Au3 window info, there are no recognized controls. However, I can do:

;ControlSend("Tera Term","","","test")

This sends the text "test" into the Tera Term window. I guess that the window receives the text and passes it along to the right control.

But, this only works if the window is not minimized. Is there some other way to send text to the window without it being restored? I've searched the forums but I didn't find a satisfactory solution...

Thanks!

Angel

Link to comment
Share on other sites

Instead of minimizing it, why not move it off screen?

Winmove("Tera Term","",@desktopwidth,0) ; just off screen to the right

WinActivate("Tera Term")

Send("test")

Winmove("Tera Term","",0,0); move it back on screen to see if it worked

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...