sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #37588
[Question #290731]: VNCScreen in Java work fine. HowTo in python ?
New question #290731 on Sikuli:
https://answers.launchpad.net/sikuli/+question/290731
Hello.
code delow work well.
But I have a lot of stiff done in python and would like to continue to work with python.
How to port the java sample in python ??
------------------------------------------------------
System.out.println("Start!\n");
Socket s = new Socket("frlesvmhostqa02", 9101); //open a socket to vnc server on listening port
s.setSoTimeout(1000);
s.setKeepAlive(true); //some socket configuration
ConnectionController cc = new ConnectionController(s);
cc.openConnection(0); //opens the vnc connection for connection 0, multiple are supported
cc.setPixelFormat(0, "Truecolor", 32, 0); //for connection 0, set pixel data to Truecolor, 32 bits per pixel, little endian
cc.start(0); //start thread that keeps BufferedImage updated by polling server for remote desktop changes
Thread.sleep(2000); //wait for buffered image to be updated before we do sikuli stuff
VNCScreen vnc = new VNCScreen(); //default constructor uses ConnectionController index 0
System.out.println("Avant Capture\n");
ScreenImage Test = vnc.capture();
Test.save("f:\\temp","test.png");
System.out.println("Fin\n");
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.