Stunt Posted May 16, 2007 Posted May 16, 2007 Hi All, I am trying to emulate a logon process onto a unix machine though openssh, as part of a bigger automation process. I have run into a stumbling block, my process works fine while I am physically logged onto the machine, but if I am not logged on and schedule a task to execute the script it does not perform the action, and I think it is due to a restriction of sending keystrokes while there is no logon?? Anyone got any advice for me?
Shevilie Posted May 16, 2007 Posted May 16, 2007 Run the program as a service.. (Use search) I know that you cant use WinWait etc while logged of.. I dont know about send, but would guess that this has a limit to. Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit
Stunt Posted May 16, 2007 Author Posted May 16, 2007 Run the program as a service.. (Use search) I know that you cant use WinWait etc while logged of.. I dont know about send, but would guess that this has a limit to.If it running as a service would it still give me the ability to send keystrokes to emulate a logon for instance?
Shevilie Posted May 16, 2007 Posted May 16, 2007 You want it to logon the computer.. no.. well I dont think it can... Try and yee shall see Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit
lcgreenwald Posted May 16, 2007 Posted May 16, 2007 Try using a rsa key pair for authentication instead of login/password.
Stunt Posted May 16, 2007 Author Posted May 16, 2007 You want it to logon the computer.. no.. well I dont think it can... Try and yee shall seeSorry let me clarify, here is a snippet of my code, I have read up on the site and found a post saying that you should try use ControlSend if you want to send keystrokes while being logged of the actuall machine, and to awnser your previous question, no im not trying to emulate a logon onto a computer, but I am trying to emulate a logon process while being physically logged off.Run("C:\oracle\ora92\bin\sqlplusw.exe")WinWaitActive("Oracle SQL*Plus")ControlFocus ("Oracle SQL*Plus", "", "Edit1")ControlSend ("Oracle SQL*Plus", "", "Edit1","sys")I have tried the above but ControlSend doesnt writ the "sys" to the box, any more suggestions? I have also tried the beta vervsion but same result
Shevilie Posted May 16, 2007 Posted May 16, 2007 WinWaitActive can not be used in logged off mode.... Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit
Stunt Posted May 16, 2007 Author Posted May 16, 2007 WinWaitActive can not be used in logged off mode....I am testting the ControlSend while being logged on just to check if that is working before I test it logged off, and its not writing the test?
Shevilie Posted May 16, 2007 Posted May 16, 2007 Run("C:\oracle\ora92\bin\sqlplusw.exe")WinWaitActive("Oracle SQL*Plus") The script wont get past this due to WinWaitActive doesnt worked when your logged ofControlFocus ("Oracle SQL*Plus", "", "Edit1")ControlSend ("Oracle SQL*Plus", "", "Edit1","sys") Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit
Zedna Posted May 16, 2007 Posted May 16, 2007 (edited) Look hereInstead of WinWaitActive() use WinWait()EDIT:If you will be still in trouble with ControlSend ("Oracle SQL*Plus", "", "Edit1","sys")oÝ÷ ÚØ^ëjëh×6ControlSetText ("Oracle SQL*Plus", "", "Edit1","sys") Edited May 16, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
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