← Back to team overview

sikuli-driver team mailing list archive

[Question #632675]: How do I set settings VNC?

 

New question #632675 on Sikuli:
https://answers.launchpad.net/sikuli/+question/632675

Hello! Sorry for my English.

I use VNC Server for android Devices.
I use client Vnc  TigerVnc Viewer and TightVnc Viewer
also i started to use Sikuli VncScreen()

My code:
------------------------
encodingHextile = 5
sVnc = vncStart('111.222.333.444', 5901)

client = sVnc.getClient()
client.writer().writeSetEncodings(encodingHextile, True)
# client.cp.setPF(PixelFormat(32, 32, True, True, 7, 7, 3, 0, 3, 6))
client.cp.pf().bigEndian = True
sleep(5)

sVnc.capture().save(Config.LOG_DIR)
-----------------------

and it's all right except for some things:

1. You use in your code  this.currentEncoding = 7:  
private VNCClient(String address, int port, String password, boolean shareConnection) throws IOException {
        this.security = new ThreadLocalSecurityClient(new BasicUserPasswdGetter(password));
        this.currentEncoding = 7;
        this.setShared(shareConnection);
        this.setServerName(address);
        this.setServerPort(port);
        this.sock = new TcpSocket(this.getServerName(), this.getServerPort());
        this.sock.inStream().setBlockCallback(this);
        this.setStreams(this.sock.inStream(), this.sock.outStream());
        this.initialiseProtocol();
    }

I can not capture a screen with  this.currentEncoding = 7,  I need this.currentEncoding = 5 (Hextile), 
I have image, but it is damaged((((
so I have a question:
How can  I set settings  VNC?

2. How do VNCscreen set as  default screen?

3. Image is damaged, even with this.currentEncoding = 5 (Hextile),  sometimes, Do you know reason?




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