protocol interface

Asked by Boris R

I would like to send commands to sikuli process from a my own program (not java, javascript, or ruby). How can I do that? Does sikuli offer a API that I can communicate with using a socket connection?

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

You might try with the:
Experimental: Play with the RunServer

http://www.sikulix.com/support.html

... and tell me a bit about your experiences.

Revision history for this message
Boris R (boris1-b) said :
#2

Reading the documentation, these are the commands that the api accepts:

stop - stops the server
start - initiates a JavaScript runner, so the next run request will start the script without delay
startp - initiates a Jython runner, so the next run request will start the script without delay *
scripts/folder/folder/folder/... - sets the folder where the runner finds the scripts **
images/folder/folder/folder/... - sets the folder where the runner finds the images used in a script (image path) **
run/script - looks for the script in the given folder and runs it (starts the respective runner if not yet done) ***

It appears that there is only a way to run a file, and not a string containing a script content. So I have to save the string into a file first and then run it. This is a bit annoying. Am I missing something ?

Revision history for this message
RaiMan (raimund-hocke) said :
#3

--- This is a bit annoying
Yes, but it is as it is, so take it or leave it ;-)

... you might write your own snippet, to save a given string to a file and then run it.

Revision history for this message
RaiMan (raimund-hocke) said :
#4

... or you might setup your own socket based server to do what you want.

Can you help with this problem?

Provide an answer of your own, or ask Boris R for more information if necessary.

To post a message you must log in.