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

RaiMan proposed the following answer:
If the Jython approach does not work, you could use the respective feature from 
the Java level:
http://docs.oracle.com/javase/7/docs/api/java/io/RandomAccessFile.html

Java example:
try {
// Connect to the pipe
RandomAccessFile pipe = new RandomAccessFile("\\\\.\\pipe\\testpipe", "rw");
String echoText = "Hello word\n";
// write to pipe
pipe.write ( echoText.getBytes() );
// read response
String echoResponse = pipe.readLine();
System.out.println("Response: " + echoResponse );
pipe.close();

} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

which has to be adapted to the Jython scripting environment:

import java.io.RandomAccessFile as RAF

pipe = RAF(r'\\192.168.173.231\pipe\testpipe', "rw");

and then using the appropriate pipe.read/write/seek commands.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to