[HowTo] instantly start Sikuli scripts from anywhere
****** more information on this is not available currently (early 2014)
... but the mentioned approach will come back later in 2014
-------
You should read on, if you
- have a bunch of scripts you are using on a regular base
- don't want to wait 3-5 seconds for a .skl to start up
- want to integrate Sikuli scripts into other automation tools and environments
- want to have a one-click feature in your browser to fire scripts, that just know where you are
Trigger the run of Sikuli scripts using XML-RPC
With this approach you may setup a XML-RPC Server running as a Sikuli script, that is able to accept xmlHttpRequests in POST format and dispatch the processing of the request to other Sikuli scripts running in the same context. So you don't need any executable (.skl) - just use your existing .sikuli's and save the startup time of about 3-5 seconds happening with every start of a .skl.
You will be able, to trigger your scripts from every environment, that is able to send an xmlHttpRequest to the server, even over the network. Communication using a text parameter forth and back at least is always available.
You can trigger your scripts
• from Browser's using JavaScript (a customizable Safari extension (Mac and Windows) as toolbar button is needed)
• from Python, Perl, Ruby, PHP and other programming languages, who have a library to setup an XML-RPC client
• Mac: based on Applescript you can easily integrate your Sikuli scripts into Automator workflows
• using suitable tools that allow you to implement the instant run of Sikuli scripts using keyboard shortcuts and/or mouse actions
The tried out implementation is restricted to process one request after another (internally new requests are queued, if another request is still processed). But this is normally acceptable, since the average Sikuli script needs to have the full control over screen, mouse and keyboard.
But if you want, you are not limited, since it is easily possible to run your scripts parallel in different threads (funny idea to have two or more Sikuli scripts fighting against each other to get the resources under control).
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- RaiMan Edit question
- Solved by:
- Tsung-Hsiang Chang
- Solved:
- Last query:
- Last reply: