Send Keystrokes with VNC

Thompson, Dale W. Thompson "at" pbworld.com
Wed, 09 Jan 2002 17:37:10 +0000


Check out AutoIt at http://www.hiddensoft.com/AutoIt/index.html for a
program that would make this task almost trivial to set up. And it's free.

You could certainly run it from the client side. Here's an untested AutoIt
script that would do about what you want:

;---- BEGIN SCRIPT ----
SetEnv, vncserver, SomeComputerNameOrIP
SetEnv, vncpassword, SomePassword
SetEnv, vncviewer, c:\\program files\\orl\\vnc\\vncviewer.exe
;
Run, %vncviewer%
WinWaitActive, Connection details
Send, %vncserver%{ENTER}
WinWaitActive, VNC Authentication
Send, %vncpassword%{ENTER}
WinWaitActive, %vncserver%
Sleep, 1000
Send, {ENTER}
WinClose, %vncserver%
;---- END SCRIPT ----

Of course, replace the variables with what's ever appropriate.

HTH,
Dale Thompson

-----Original Message-----
From: Floyd Russell [mailto:floyd "at" neospire.net]
Sent: Wednesday, January 09, 2002 7:42 AM
To: vnc-list "at" uk.research.att.com
Subject: Send Keystrokes with VNC


Ok, so yet again I will ask this question. Does anyone have an example
of how to send a series of keystrokes to a VNC server, including the
login/logout
process? I need to be able to write a script that logs into a server running
VNC, sends return, and quits. The last time I sent a message like this I got
a
lot of "use such and such program it sits on the server and waits for dialog
boxes and does stuff accordingly". The problem is that this server is a
WinNT 4.0 Server,
that remains locked whenever there is not a human working on it. This
particular
error message pops up over the Workstation Locked message. If anyone has
some simple
example they could throw my way it would be greatly appreciated.
Thanks,
Floyd R.
---------------------------------------------------------------------
To unsubscribe, mail majordomo "at" uk.research.att.com with the line:
'unsubscribe vnc-list' in the message BODY
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, mail majordomo "at" uk.research.att.com with the line:
'unsubscribe vnc-list' in the message BODY
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------