Jump to content

Terminal Server connection


 Share

Recommended Posts

Hi everybody,

I am working on my first AutoIT script (except from those of the Tutorials).

I want to use AutoIT as a testing bot for some of our corporate applications. One of these applications works under Terminal server and I am automating the process of entering a user/password and performing some additional actions.

The script is really, really simple (Did I say I am noob?). It works perfectly...as long as I have the RDP session opened in front of me, that is, active.

The following piece of code works perfectly if I keep RDP pen:

Run ("Application")
WinWaitActive ("Window Name", "Any Text")
Send ("AAA")
Send ("{TAB}")
Send ("AAA")
Send ("{TAB}")
Send ("{ENTER}")

But as long as I run the script automatically (i.e., I configure the user's profile or group policies to run the script for terminal services users) it stops working.

The moment I maximize the RDP session, the script keeps working perfectly.

I now it has some relation with the focus of the window. Obviously, when I minimize the RDP session teh focus is lost, but if I try AutoIT to set focus on the window it does not seem to work:

WinActivate ("Window Name")
WinWaitActive ("Window Name", "Any Text")
Send ("AAA")
Send ("{TAB}")
Send ("AAA")
Send ("{TAB}")
Send ("{ENTER}")

Probably I´m wrong with something...

Thanks in advance for your help.

Link to comment
Share on other sites

Hi everybody,

I am working on my first AutoIT script (except from those of the Tutorials).

I want to use AutoIT as a testing bot for some of our corporate applications. One of these applications works under Terminal server and I am automating the process of entering a user/password and performing some additional actions.

The script is really, really simple (Did I say I am noob?). It works perfectly...as long as I have the RDP session opened in front of me, that is, active.

The following piece of code works perfectly if I keep RDP pen:

Run ("Application")
WinWaitActive ("Window Name", "Any Text")
Send ("AAA")
Send ("{TAB}")
Send ("AAA")
Send ("{TAB}")
Send ("{ENTER}")

But as long as I run the script automatically (i.e., I configure the user's profile or group policies to run the script for terminal services users) it stops working.

The moment I maximize the RDP session, the script keeps working perfectly.

I now it has some relation with the focus of the window. Obviously, when I minimize the RDP session teh focus is lost, but if I try AutoIT to set focus on the window it does not seem to work:

WinActivate ("Window Name")
WinWaitActive ("Window Name", "Any Text")
Send ("AAA")
Send ("{TAB}")
Send ("AAA")
Send ("{TAB}")
Send ("{ENTER}")

Probably I´m wrong with something...

Thanks in advance for your help.

Is your script running on your local machine and acting on the RDP window, or is it running from within he RDP session itself?
Link to comment
Share on other sites

Is your script running on your local machine and acting on the RDP window, or is it running from within he RDP session itself?

Hi ResNullius,

from within the RDP session, I'm executing it on the remote machine.

Thanks and best regards.

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...