Jump to content

Recommended Posts

Posted

I have developed a script using AutoIt and would like it to run daily on a server. But my script is not sending keys when I use SEND Function unless I am logged on to a sever. Any advice how can I run my script without logging on to a server.

Thanks

Posted

I think Send only works on the active window and since you're logged off it won't do much. You have to use ControlSend().

Posted

I think Send only works on the active window and since you're logged off it won't do much. You have to use ControlSend().

Thanks for the quick reply... let me give it a try

Posted (edited)

I think Send only works on the active window and since you're logged off it won't do much. You have to use ControlSend().

I just tried ControlSend function and it did not work for me. Here is my code: -

Run ("J:\fltctrl\bin\MxtCtrl.exe") ; to open my program

WinWaitActive("Log In - Maintenance Control", "")

ControlSend("Log In - Maintenance Control", "", "TEdit2", "username");

ControlSend("Log In - Maintenance Control", "", "TEdit1", "password")

Edited by sanmeet
Posted

You should test to see if you can get a handle to those controls first then.

$handle = ControlGetHandle ("Log In - Maintenance Control", "", "TEdit2")

If @error Then MsgBox(0,"","ERROR")

If there is no error you can use that handle variable to do the ControlSend()

ControlSend("Log In - Maintenance Control", "", $handle, "username");

Posted

You should test to see if you can get a handle to those controls first then.

$handle = ControlGetHandle ("Log In - Maintenance Control", "", "TEdit2")

If @error Then MsgBox(0,"","ERROR")

If there is no error you can use that handle variable to do the ControlSend()

ControlSend("Log In - Maintenance Control", "", $handle, "username");

I tried your suggestion and still not working....any other suggestions?

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
×
×
  • Create New...