So what is SIKULI? I think anyone who has used game cheats (helper programs for online games) knows the famous Chinese macro tool AnJian Jingling, which automates keyboard and mouse actions. Sikuli Script is quite similar to that kind of tool (but it is not a cheat). Sikuli Script makes it very easy to build a program. Most programming languages today use purely text-based code, but Sikuli Script is different: its code is made of images. The author of Sikuli Script is a true genius to have come up with such a creative idea. Still, that may not make much sense to you yet (what do you mean, writing programs with images....?). So let's build a Sikuli Script program together!

Right now, Sikuli Script is mainly used for writing scripts, such as automatically logging into games or instant messengers (IM). Since Sikuli Script has only been around for a short time, its features are not fully developed yet. However, it already supports basic features such as if statements and loops, so you can still write a fairly complete program. Also, if you’re interested in studying Sikuli Script further, you can look into Python, the programming language, because according to the official site, Sikuli Script is developed in Python. The way loops and conditional statements work in Python is almost exactly the same as in Sikuli Script.

Sikuli Script Information:

SIKULI Installation:

P.S. All examples in this article use Windows XP.

  1. First, download the installer from the official SIKULI website. Then make sure your computer has JRE installed, and open the SIKULI installer.

  1. Click [Next]

  1. Set the installation location for SIKULI, then click [Next]

The program will ask you to confirm that you really want to install into the folder you set. Click [OK].

  1. Click [Next]

  1. Installation starts. When both the top and bottom progress bars are complete, click [Next]

  1. Click [Next] directly

  1. Done

Writing a Simple Little Program with SIKULI

Next, we'll use SIKULI to write a small program that automatically logs into an instant messenger. Just follow the steps.
  1. Open the main Sikuli program, then click [File] → [New] to create a new project.

  1. Open the instant messenger’s main program, but don’t log in yet (and don’t minimize it)

  1. In the code area, type click() and place the cursor between the parentheses ()

  1. Click the camera button in the upper-left corner of the SIKULI program

  1. Drag the mouse to draw a box around the account input field of the instant messenger

  1. You’ll automatically return to the code editor. On a new line, type type(“你的帳號t你的密碼”)

For example: type(“linroext12345689”)

This step makes the program enter your account, then automatically start a new line and enter your password.

  1. Again, start a new line and type click(), keeping the cursor inside the parentheses, then click the camera button

  1. Again, drag the mouse to draw a box around the login button

  1. That should just about do it. Check that your code matches mine. If it does, open the instant messenger program first, then click the green triangle button to start running

  1. After you finish writing, you can save your program. However, in my testing, it can’t currently be saved as an exe file, only as a project file. When you want to use it, open the Sikuli main program and run it. I hope it can be saved as an exe file in the future.

Notes on Using Sikuli:

  1. Sikuli is case-sensitive. For example, openapp and openApp are different.
Summary: Now that you've gone through the tutorial above, you should have a basic understanding of Sikuli Script. If you're a programmer, you're probably feeling pretty conflicted right now! With a programming language this simple, how will programmers make a living?! Actually, it's fine. Writing a good program has little to do with the language you use (machine language excepted.....). What matters most is logic. SIKULI isn't really meant to let a total beginner write programs. Its real purpose is to make code more readable. One more thing: the author of SIKULI is Taiwanese, so this programming language is truly a source of pride for Taiwan~