Jump to content

Sending keystrokes while being logged out


Recommended Posts

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

You want it to logon the computer.. no.. well I dont think it can... Try and yee shall see

Sorry 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 :)

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 of

ControlFocus ("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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...