How to stop sikuli instances running in background?

Asked by hal3390

I'm currently use sikuli to automate CITRIX sessions, because parts of the workflow need minutes before we can continue and in future we want to automate it in a virtual machine.
Because of this I use timeouts of 600 seconds or greater in wait statements and sometimes it is not clear if a sikuli instance already ended or wait in the background and if it still wait and I start the IDE again, it interact with the objects in the editor or crash my test!

How can I see, if sikuli instances are still running and how can I stop them?

Environment: Windows 8.1 pro

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
hal3390 (j-roger) said :
#1

Is it possible, to display any debug information, while the script is running?

Revision history for this message
masuo (masuo-ohara) said :
#2

In the following url, we can learn about the options.

http://sikulix-2014.readthedocs.org/en/latest/faq/010-command-line.html

Revision history for this message
hal3390 (j-roger) said :
#3

thank you for the help, but this is not a solution for my primary question / problem

Revision history for this message
masuo (masuo-ohara) said :
#4

If you are satisfied with a following simple specification, It is possible to achieve by addHotkey().

example 1:
Push Ctrl + F1
When Sikuli-ide is still running, it displays "Still runing".
When Sikuli is finished, it displays nothing.

Script for example 1:
def DisplayStatus(event):
    popup("Still running!", "Workflow Status")

Env.addHotkey(Key.F1, KEY_CTRL, DisplayStatus)

example 2:
Push Ctrl + F2
When Sikuli-ide is still running, it stops Sikuli-ide.

Script for example 2:
import sys
def StopSikuli(event):
    sys.exit()

Env.addHotkey(Key.F2, KEY_CTRL, StopSikuli)

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

If I understand right:
You are looking for some "I am alive" information, while a SikuliX workflow just waits for an image to appear, which in turn might take a long time.

please confirm.

Generally I recommend, to use the latest SikuliX: http://sikulix.com

Revision history for this message
hal3390 (j-roger) said :
#6

Hello Masuo,
very helpful - thanks a lot!

Hello RaiMan,
confirmed

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

ok, then there is no easy way in the moment.

With 1.1.0:
if you turn on Debugging with level 3, then SikuliX spits out Debug messages with every search attempt during such a wait.
These could be seen in the command line window, when running from command line.

Generally: if you run your script from command line, the command prompt should tell you, wether it is running or not.

Can you help with this problem?

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

To post a message you must log in.