← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #294217]: [1.1.1] new VNCScreen(): crashes with NPE

 

Question #294217 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/294217

RaiMan proposed the following answer:
--- silent setup:
faq 2609

--- VNC state
this is now available with the latest nightly build:

--- Python scripts:
vnc = vncStart("192.168.2.24") 

tries a connection to a VNC server on the given IP using port 5900

the method doc:
## -----------------------------------------------------------------------
# vncStart(ip="127.0.0.1", port=5900, connectionTimeout=10, timeout=1000):
# convenience for a VNCScreen connection
# ip the server IP (default: 127.0.0.1)
# port the port number (default 5900)
# connectionTimeout seconds to wait for a valid connection (default 10)
# timeout the timout value in milli-seconds during normal operation (default 1000)
# returns a VNCScreen object
# use theVNCScreen.stop() to stop this connection again (auto-stopped at script end)

--- in Java
VNCScreen vnc = VNCScreen.start(theIP, thePort, cTimeout, timeout);

all parameters must be given, no defaults

on success, vnc can be used like a Screen object.

to stop a session:
vnc.stop()

this is tested from Mac to a TightVNC server on Windows

principally possible, but not yet tested: you can have more than one
session (VNCScreens) in parallel

I will add more information in the docs:
http://sikulix-2014.readthedocs.io/en/latest/screen.html#connecting-to-a-vnc-server-vncscreen

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.