sanmeet Posted December 2, 2007 Posted December 2, 2007 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
weaponx Posted December 2, 2007 Posted December 2, 2007 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().
sanmeet Posted December 2, 2007 Author Posted December 2, 2007 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
sanmeet Posted December 2, 2007 Author Posted December 2, 2007 (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 programWinWaitActive("Log In - Maintenance Control", "")ControlSend("Log In - Maintenance Control", "", "TEdit2", "username"); ControlSend("Log In - Maintenance Control", "", "TEdit1", "password") Edited December 2, 2007 by sanmeet
weaponx Posted December 2, 2007 Posted December 2, 2007 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");
sanmeet Posted December 2, 2007 Author Posted December 2, 2007 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?
weaponx Posted December 2, 2007 Posted December 2, 2007 Did the ControlGetHandle show an error? Maybe in this case try ControlSetText()
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now