Jump to content
Sign in to follow this  
Stunt

Sending keystrokes while being logged out

Recommended Posts

Stunt

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?

Share this post


Link to post
Share on other sites
Shevilie

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

Share this post


Link to post
Share on other sites
Stunt

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?

Share this post


Link to post
Share on other sites
Shevilie

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

Share this post


Link to post
Share on other sites
lcgreenwald

Try using a rsa key pair for authentication instead of login/password.

Share this post


Link to post
Share on other sites
Stunt

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

Share this post


Link to post
Share on other sites
Shevilie

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

Share this post


Link to post
Share on other sites
Stunt

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?

Share this post


Link to post
Share on other sites
Shevilie

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

Share this post


Link to post
Share on other sites
Zedna

Look here

Instead 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 by Zedna

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  

×