Vncscript is a program that I've written to allow scripting of a 
vnc session. It allows a program to automate mouse motion on a vnc 
server. (Sorry, but it doesn't do keyboard input right now.)

This code was originally based on x2vnc, which can be found at

	http://www.hubbe.net/~hubbe/x2vnc.html

That code was based on the original vnc code, which can be found at

	http://www.uk.research.att.com/vnc/

Isn't the GPL wonderful?

The command to execute is "./vncscript <host>:<vnc display>". 

Vncscript uses a simple stack-based language to control the mouse. The
syntax follows. Stack based means that first the arguments are placed
onto the stack, then a command acts on them. Commands are described as
follows:

<arg1> <arg2> command
	arg1 and arg2 are taken from the stack, and used as arguments for
	the command.

Integers are placed directly on the stack. Otherwise, the argument is
a command, and unknown commands trigger an error.

Command List
============

<x> <y> move
	Moves to the coordinate relative to the left and top of the
	screen. If the numbers are negative, the coordinates are
	relative to the right or bottom of the screen instead.

<x> <y> rel
	Moves the mouse relative to the current position.

<button> <wait> click
	Pushes the given button mask down for wait milliseconds. The mask
	consists of the values of 2^button number anded together. (Wow.)

<x> <y> <button> pointerevent
	This sends raw events to the vnc server. (This can be used to
	play back a raw vnc stream, recorded using a vncviewer patched
	with the associated vnc.patch.)

<button> hold
	Holds the current button mask down. Use "0 hold" to release the
	buttons. This is used to drag the mouse.

<time> wait
	This waits for the given number of milliseconds.

stack
	Prints out the current number of entries on the stack.

<a> print
	Prints a.

<a> <b> +
	Pushed a+b onto the stack.

<a> <b> -
	Pushed a-b onto the stack.

<a> <b> *
	Pushed a*b onto the stack.

<a> <b> /
	Pushed a/b onto the stack.

x
	Pushes the current x coordinate onto the stack.

y
	Pushes the current y coordinate onto the stack.

width
	Pushes the screen width onto the stack.

height
	Pushes the screen height onto the stack.

