Jump to content
Sign in to follow this  

Running AU3 File on Windows 2003 Server as Task Issue

Recommended Posts



I've been trying to setup a scheduled task on a Windows 2003 R2 server to open an application in the root of the C drive, wait for 2 minutes, and then send the keys TAB and ENTER. I came across AutoIt which seems to be able to do this, but my issue is with the WinActivate function. When the app opens with Run it is NOT given focus, so I put in the WinActivate to give that program the focus. When I run the scheduled task while I have the remote desktop connection to the server open it works just fine - everything works just fine!

But when I close my remote desktop connection, not logging out but just closing it, everything runs except the WinActivate. The app launches but focus is not given to it with the WinActivate function and the keys are not sent.

Any assistance anyone can offer me? I found the exact same issue running simple VBScript!

Here's the contents of the AU3 file:


Operations Engineer

Share this post

Link to post
Share on other sites

I am just guessing here, but it looks like you want to click on a button in the app.

You might try using "AutoIt Window Info" to find the control name for the button, then use ControlClick() to directly register a click on the button in that window.

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