Windows: run script on command line --- killing cmd does not stop script

Asked by stephane on 2018-12-05

I know it's not possible to use the shortcut Alt + Shift + C on Windows when we launch a script from the command line. But even if I interrupt manually the command, or if I kill the Windows console, the script keeps running. The only way for me to kill it is to open another console and run

wmic process where "name like '%java%'" delete

Is this a bug or am I missing something? I'm running the latest Sikulix on Windows 10, and use the command

C:\\SikuliX\\sikulix.jar -r script.sikuli

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
masuo (masuo-ohara) said : #1

It can stop running by killing the Windows console if run from commandline using "java -jar C:\\SikuliX\\sikulix.jar -r script.sikuli".

And it can stop running by using addHotkey() even if run from commandline using "C:\\SikuliX\\sikulix.jar -r script.sikuli".

[example code:]
def stopScript(event):

Env.addHotkey(Key.END, KeyModifier.CTRL, stopScript)
popup("END/CTRL to stop")

RaiMan (raimund-hocke) said : #2

I have to do some testing.
... and eventually make this a bug ;-)

Can you help with this problem?

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

To post a message you must log in.