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

Asked by Punith naik

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:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
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.

Revision history for this message
Punith naik (punith066) said :
#2

Thanks RaiMan, that solved my question.