[1.1.4] Hotkey doesn't work in runnable jar file --- export as runnable jar currently not available.

Asked by Punith naik on 2018-10-08

I am using SikuliX 1.1.4
I have converted the following code to runnable jar using sikuli IDE:
stop = False
def xHandler(event):
    global stop
    stop = True
Env.addHotkey("x", KeyModifier.CTRL + KeyModifier.SHIFT, xHandler)
while(1):
    mouseMove(50,50)
    wait(1)
    mouseMove(-50,-50)
    wait(1)
    if stop == True:
        exit()

When I execute jar file and press CTRL+SHIFT+x, execution doesn't stop.
But this works fine when I run the code from sikuli IDE

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2018-10-08
Last query:
2018-10-08
Last reply:
2018-10-08
Best RaiMan (raimund-hocke) said : #1

the feature "export to runnable jar" is no longer available in version 1.1.4 (please always use the latest build >100), because it does not work anyways.

So currently there is no solution for distribution of scripts on systems that do not have a valid SikuliX installation.

You might try with 1.1.3, which is restricted to systems having a Java 8.

Punith naik (punith066) said : #2

Thanks RaiMan, that solved my question.