Sign in to follow this  
Followers 0
cysacenda

Application automation on a server

4 posts in this topic

Hello everybody,

I'm a developer and I'm working on a software in C#.NET with WinForms. To test our interfaces, we started to use Autoit to simulate the keyboard/mouse and make some actions in the application :It' fantastic ! ;)

We now want to industrialize the process and automatically start Autoit scripts every night on a Windows server (it's a computer with Windows XP but we're using it like a server). For information, we're trying to start Autoit scripts from a Nant task.

The thing is that we're facing a problem with this solution. Indeed, when we start a script from a Nant task, there's nothing going on on the screen (we're seeing the screen with a RDP connexion). I think the problem comes from the fact that the script in started as a task, in background (we can see it because started scripts are visible in the tasks manager).

I've spent my afternoon on internet to find a solution to this problem, but I didn't. I know it's not completely linked with Autoit, but I can imagine it's a reccurent problem and somebody on this forum already faced it.

If you have any idea or solution for this problem, that would really help me ! :)

Thank you in advance for your help,

Cyril SACENDA

Share this post


Link to post
Share on other sites



Hi Cyril,

I don't know about running processes fron nant, but I know of a pitfall when running a process using a remote desktop session (RDP). If you minimize the RDP window, windows switches to a mode with no GUI, and does not display windows or controls for that session.

in case you havent tried this, here is a registry entry for XP that may fix this:

under this key, <HKCU or HKLM>SoftwareMicrosoftTerminal Server Client

create this DWORD value RemoteDesktop_SuppressWhenMinimized and set it to 2

On later Windows OS (Vista, Windows 7, 2008), there are "group policies" that need to be set up (use gpedit.msc, at a location like "Local Computer Policy/Computer Configuration/Windows Settings/Security Settings/Local Policies/Security Options")

Best of luck!

Share this post


Link to post
Share on other sites

Hello everybody,

I'm a developer and I'm working on a software in C#.NET with WinForms. To test our interfaces, we started to use Autoit to simulate the keyboard/mouse and make some actions in the application :It' fantastic ! ;)

We now want to industrialize the process and automatically start Autoit scripts every night on a Windows server (it's a computer with Windows XP but we're using it like a server). For information, we're trying to start Autoit scripts from a Nant task.

The thing is that we're facing a problem with this solution. Indeed, when we start a script from a Nant task, there's nothing going on on the screen (we're seeing the screen with a RDP connexion). I think the problem comes from the fact that the script in started as a task, in background (we can see it because started scripts are visible in the tasks manager).

I've spent my afternoon on internet to find a solution to this problem, but I didn't. I know it's not completely linked with Autoit, but I can imagine it's a reccurent problem and somebody on this forum already faced it.

If you have any idea or solution for this problem, that would really help me ! :)

Thank you in advance for your help,

Cyril SACENDA

If I'm understanding you correctly, then yes that is how autoit works. It just runs the commands you give it. If you want to see what is going on, you have to output them using various methods. If you are just running dos command line options using Run, RunWait etc. You can use the @SW_SHOW parameter. If you are calling external programs or any other non command line functions you can make messages that pop up when a new function or command is called.

Take a look at SplashTextOn() in the help file, which you can use for custom messages between commands/functions.


EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites

Hello,

Thank you very much for your answers. I thing I've not been very clear in my first message ! Excuse my english. ;)

My real problem is that when the Autoit script will be automatically started by the Nant task (I've tried with scheduled tasks and I get the same problem, I think...), there will be no user logged-in on the computer (with remote desktop or directly on the computer).

I've done some tests today and I've found that if I'm connected with a remote desktop connexion on the computer when a scheduled task starts my Autoit script, it works.

But if I close the remote desktop connexion, it's not working.

It seems to be simple, but I've been searching solutions all the day and I've nothing...

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