statemousesikuli-x

sikulix 2.0.5 detect if mouse pointer is idle or busy


In my website, I am using a Java Applet. The mouse pointer changes to busy whenever I click a link in the JApplet. I want to check if mouse pointer is idle or busy. I have tried to import win32gui as explained in this answer in vain. Is it feasible to check if mouse is idle or busy in sikulix 2.0.5?

This is what I'm trying to achieve

while mouse_pointer_is_idle:
    click("1733637249299.png")
    mouseMove(1,0)
    update_if_mouse_pointer_is_idle_or_not()
    wait(0.3)

Thanks in advance


Solution

  • Hi I solved it using MANIFEST.MF flie to add jna dependencies (compulsary empty newline at last line else it won't build dependencies)
    Manifest-Version: 1.0
    Main-Class: newmain
    Class-Path: lib/jna.jar lib/jna-platform.jar

    I downloaded JAVA JDK 1.8 to make it work in sikuli
    Then I did

    E:\\jdk1_8_0_202\\bin\\jar cfm Jar.jar MANIFEST.MF \*.class
    

    then in sikuli

    sys.path.append("E:\\Downloads\\jarf\\withdependency\\newmain.jar")  
    import newmain;  
    ct=newmain.cursor_type();  
    print(ct.getCode());  
    print(ct.getCode()==32514);
    

    https://drive.google.com/file/d/1w18kSUs0HlL6i2OqQ6rv2qHww6az1I6Y/view

    This is my jar file

    Thanks