Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

c++ library for Sikuli

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 include
Octocat-spinner-32 interfaces
Octocat-spinner-32 lib
Octocat-spinner-32 sikuli.xcodeproj
Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CMakeLists.txt
Octocat-spinner-32 README
Octocat-spinner-32 build.sh
README
Dependencies
------------

 * opencv2.1

      A computer vision library the Sikuli's visual technology is
      based upon.

 * libcurl   
      
      A URL transfer library used by Sikuli to load a target image from
      a web location so that we can do something like 

          click("http://www.sikuli.org/images/some-button.png")


Build and install Sikuli Python module
--------------------------------------

Download the source from github

$ git clone git://github.com/doubleshow/libsikuli.git

Run the Python setup script

$ cd sikuli
$ python setup.rb install

Test if it's working by running an example script

$ cd examples/python
$ python mute.rb

You can also try some basic Sikuli commands from Python's interactive shell

$ python
Python 2.7 (r27:82508, Jul  3 2010, 21:12:11) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from sikuli import *
>>> click("http://www.sikuli.org/images/apple.png")



Running a script created by the Sikuli IDE
------------------------------------------

1. Use Sikuli-IDE to create a simple script to click on something.

click(IMAGE)

2. Save the script as click.sikuli

When saving the script, the Sikuli IDE will create a new directory
called click.sikuli under the directory you choose to save the
script. Using the console, you can examine the content of the
click.sikuli directory as follows:

$ cd click.sikuli
$ ls

  1281093568271.png  click.html  click.py

click.py is the python script with the one line of code you just
wrote. click.html is a web page letting you visualize the
script. 1281093568271.png is the image you captured and assigned to
the click command as the target. This image's filename is a random
number generated by the IDE and does not have any special
meaning. Don't be surprised if you see a different filename for this
image on your system.

3. To run click.py as a pure Python script. We need to explicitly
import the sikuli module in the script using an import statement. To
do so, open click.py in a text editor and add the following line in
the beginning of the file:

from sikuli import *

Note that when running the script, Sikuli IDE automatically adds the
import statement to the script and that's why we don't need to bother
adding the import statement.

After adding the import statement, the modified script should look
like:

from sikuli import * 
click("1281093568271.png")

4. In the console, run the script as follows:

$ python click.py



Something went wrong with that request. Please try again.