-1

I am not very familiar with Sikuli.

  1. Can I use Sikuli with python 3.4 or only 2.7?
  2. In a Sikuli project, the script takes over the mouse and keyboard, meaning you can't work on something else while this is running. Obviously this is a big waste of time. Is there any way to run Sikuli and work on something else simultaneously on the same computer?
  3. I am not familiar with virtual machines, but I heard it has some issues with Sikuli. Is there any way to get over this?

  4. Bonus question, how to make a Sikuli script an exe file which the user can click and run from his desktop, without the need of any interpreter installed?

Eugene S
  • 6,709
  • 8
  • 57
  • 91
Nadav
  • 1
  • 3

2 Answers2

1
  1. Sikuli is not using Python but Jython. If you need more information you should refer to Jython official documentation.
  2. Sikuli is using Java Robot library to control keyboard an mouse and physically controls both. There is no way to work around that.
  3. Sikuli interacts with visual contents of the screen and operates by taking screenshots and detecting pre-saved patterns. Hence it is impossible to run it in the background.
  4. The main issue with VM is the same as explained in previous paragraph. Unless you have a VM with an actual screen attached to it (which is basically just another desktop :) )
  5. Since Sikuli is using Jython, you can try packing your script into jar. There is a related question on that topic here.
Community
  • 1
  • 1
Eugene S
  • 6,709
  • 8
  • 57
  • 91
  • Thank you. So to run sikuli (not .jar file) do I need java installed, or jython is enough? Does sikuli crash if the user moves the mouse? Is there any other way to interact with gui that doesn't take over the mouse? – Nadav Jul 05 '16 at 18:59
  • @Nadav Generally you do not have to install neither of them as Sikuli comes prepackaged with all it needs. If you try to move the mouse or use the keyboard while Sikuli operates, it will not crash. It will just look like 2 people are dragging the mouse to different directions and someone is using the keyboard along with you. Just try it yourself to get the feeling if you are interested. – Eugene S Jul 06 '16 at 01:01
  • @Nadav There is no way to let Sikuli work without taking control of the input streams. Even if it was possible, Sikuli still needs to have access to actual visual content on your screen so you still won't be able to use your PC at the same time. If your question about "other way" implied using other automation tools then the answer is yes. There are tools that do not take control of the input. – Eugene S Jul 06 '16 at 01:02
  • What tools? Or does it differ depending on the program you want to automate? – Nadav Jul 07 '16 at 16:58
  • @Nadav Well there are many different tools, you can see a list of (all?) of them here: https://en.wikipedia.org/wiki/List_of_GUI_testing_tools. I know that AutoIt for example, can run some tasks in the background while you can still continue your work. You can read about it here: https://en.wikipedia.org/wiki/AutoIt. Obviously each one of these tools has their pros and cons. Some of them are also closed code or paid (commercial), like QTP. – Eugene S Jul 08 '16 at 01:25
0
  1. You can actually use sikuli while also doing other work. It's not done directly through sikuli though. I have a script that does it but I don't have direct access so I'll just give the semantics. It's done using VNC sessions.

    In a bash script, start a vnc session

    Point the display of that vnc session to sikuli.

    Sikuli then works on that vnc session, while you work on the machine (or through a different vnc session)

    This all has to be managed by the bash script, I don't know if a batch/powershell script (or even a python/perl script) would be capable of managing it, however that answers #4 in that it makes the end user experience click-to-run (still requiring an interpreter or packing into a jar)

    This works on unix machines, I don't know about windows as I've only ever used windows as a VNC client

If I get access to the script later, I'll post the relevant parts here.

Brydon Gibson
  • 1,179
  • 3
  • 11
  • 22