Sign in to follow this  
Followers 0
Tsel

Controlsend help - very simple actions

1 post in this topic

Hello again.

Once again I am asking for some assistance.

What I am trying to do is open PuTTY connection manager, then have autoit open my PuTTY sessions on the background while I do something else. There are two parts to this for now. First one is the one that opens the program and selects the session. The issue I have with this part is that it doesn't send the {ENTER} while the script is running in background. It does select the session but nothing happens. If the window for the program is active then the connection is selected and it is activated. So it must be something with my script line.

run("C:\Program Files\PuTTY Connection Manager\puttycm.exe")

sleep(1000)

controlSend("PuTTY Connection Manager", "","WindowsForms10.SysTreeView32.app.0.3ce0bb81","{DOWN}",0)

controlSend("PuTTY Connection Manager", "","WindowsForms10.SysTreeView32.app.0.3ce0bb81","{ENTER}",0)

On the second part, the script just doesn't print anything either when the window is active or not. The window info tool shows only window title but not the control info so I am just trying to use the window title.

sleep(1000)

controlsend("PuTTY Connection Manager", "","","username")

controlsend("PuTTY Connection Manager", "","","{ENTER}",0)

sleep(500)

controlsend("PuTTY Connection Manager", "","","password")

controlsend("PuTTY Connection Manager", "","","{ENTER}",0)

Any help is appreciated even if it is a totally different strategy.

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