Suppose I am running a Sikuli program and I want to pause the program at a particular point and then after sometime I want to resume the program from that point where I paused, without affecting the process. And then I want to stop the process and exit from it. The point where I stopped till that it should be saved. Is it possible in Sikuli? If yes, then how?
3 Answers
Press Alt+Shift+c to kill a running Sikuli script.

- 4,559
- 5
- 36
- 48

- 651
- 6
- 9
-
Sikuli does not have the features that you are asking about natively. You will have to add them to your script programmatically. Since you have both Java and Python as a resource you might investigate those languages for libraries that will give you this capability. – BroknDodge Feb 21 '14 at 22:13
-
If you need to kill it within the script you can use `type('c', KeyModifier.ALT + KeyModifier.SHIFT)` to run this instruction from the script – A.Casanova Oct 31 '22 at 15:12
No, Sikuli has no built-in capability to manage this for you. However, you can write all of these capabilities into your script or otherwise get them.
Pausing an resuming is most easily done on the Unix command-line, where you can use control-z to suspend a program and fg
to resume it. Windows has similar capabilities. Look for "suspend and resume process " to find some ways of doing this (there are many).
Exiting from a program and then being able to re-start the program and have it resume (roughly) where it left off is called "checkpointing". The checkpointing packages I know of are intended for distributed computing and would probably be overkill for what you're doing, but you could take a look at the Wikipedia entry for suggestions. I suspect that implementing it yourself will be the easiest way to go.
For help with either of these topics, I recommend starting a new question specifying the language you're using (Jython or Java) and the operating system (Unix or Windows). The questions and answers to these aren't related to Sikuli.

- 23,261
- 7
- 71
- 99
For pause, you can use wait commands; if you want to resume, you need to have flags that you set at the beginning of the script, and change accordingly to what you want to wait for.
For closing the script; you can use the Type command wherever you want the script to quit; which is the equivalent of pressing CMD-Shift-C when using the IDE
type('c', KeyModifier.CMD + KeyModifier.SHIFT)
Hope this helps