[error] Mouse: not useable (blocked) --- but click works

Asked by Mr Mouse

Hi

I am having a problem I cannot find the solution for. I run some scripts from SikuliXIDE on my laptop.

It works great at the office, but at home it will report the [error] Mouse: not useable (blocked) and commands of type mousemove does not work. Commands like click() does still work. So the script is able to move the mouse.

The only difference compared to my office setup is that I don't have external monitors connected via USB-C. Everything else is the same. I use the same mouse in both setups.

I have tried running SikulixIDE from CMD with admin rights. It does not fix the problem.

Any ideas?

Windows 10 Enterprise 19042.1348

Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Sorry for the inconvenience.

If click works, simply ignore the message: It is an internal problem, that in some situations the reported position is 1 or 2 pixel away from the calculated target of the mouse move.

Has to be fixed somehow in future versions.

Revision history for this message
Mr Mouse (mrmouseblock) said :
#2

Hi

Thanks for the reply.

Just to clarify since mouseMove works in the office setup, but not at the home office setup:
Should I use a different function than mouseMove until it is fixed?

Revision history for this message
RaiMan (raimund-hocke) said :
#3

not clear:
click works, but not mouseMove?

a click internally is a sequence of mouseMove and mouseDown/Up.

So please more info about what means: moseMove does not work.

Revision history for this message
Mr Mouse (mrmouseblock) said :
#4

Yes, that is correct.
I am also confused how click() can move the mouse pointer and mouseMove reports [error] Mouse: not useable (blocked)

I will try to clarify some more:

In the office with external monitors connected @2560x1440:
 - mouseMove works correctly - no error messages
 - click() works

At home office on the same laptop, but without external monitors connected @1920x1080:
 - mouseMove does not work and the [error] Mouse: not useable (blocked) is reported as soon as SikuliXIDE is started and every time I try to run a mouseMove command.
 - click() works

Can it be related to the resolution? That is the only thing that is different. Note that the problem is there even with a fresh made test script, so there should not be any problems with coordinates outside 1920x1080 or something like that.

I also tried now with a simple hover(Screen(0)) ---> [error] Mouse.move(): Mouse not useable (blocked)
click() --> works

I hope this did not add more confusion...

Revision history for this message
RaiMan (raimund-hocke) said :
#5

My question was not about the message, but about whether the mouse moves to the center of the screen in your last example.

Revision history for this message
Mr Mouse (mrmouseblock) said :
#6

Ok, I misunderstood.

The mouse pointer only moves with the click() function without external displays connected.

The mouse pointer moves with click(), mouseMove and hover() with external displays connected.

Revision history for this message
RaiMan (raimund-hocke) said :
#7

Ok thanks
Have to Check.

Version 2.0.5?

Revision history for this message
Mr Mouse (mrmouseblock) said :
#8

Thanks!

Version 2.0.5.

Attached is a log.

1st MenuAction.runSelection is a successful click() operation
2nd MenuAction.runSelection is an unsuccessful hover() operation
3rd MenuAction.runSelection is an unsuccesful mouseMove() operation

[15179 debug] JythonRunner: ready: version 2.7.2
[debug] IDE: MenuAction.runSelection
[debug] Jython: SikulixForJython: init: starting
[debug] Jython: added as Jython::sys.path[0]:
C:\Users\MrMouse\AppData\Roaming\Sikulix\Lib\site-packages
[debug] Jython: SikulixForJython: init: success
[debug] Jython: sikuli: Sikuli: starting init
[debug] Jython: use as default region: R[0,0 1920x1080]@S(0)
[debug] Image: BufferedImage: (1920, 1080)
[debug] Jython: sikuli: Sikuli: ending init
[debug] Jython: use as default region: R[0,0 1920x1080]@S(0)
[debug] Image: BufferedImage: (1920, 1080)
[debug] Image: loaded: 1639130662379.png (file:/C:/Users/MrMouse/Desktop/test.sikuli/1639130662379.png)
[debug] Image: cached: 1639130662379.png (724 KB) (# 1 KB 724 -- 1 % of 64 MB)
[debug] Region: wait: waiting 3,0 secs for 1639130662379.png to appear in R[0,0 1920x1080]@S(0)
[debug] RunTime:loadlib: trying opencv_java430
[debug] RunTime:addToWindowsSystemPath: added to systempath:
C:\Users\MrMouse\AppData\Roaming\Sikulix\SikulixLibs
[debug] RunTime:libsExport: folder exists: C:\Users\MrMouse\AppData\Roaming\Sikulix\SikulixLibs (2.0.5 - 202103030913)
[debug] RunTime:loadLib: opencv_java430.dll (success)
[debug] Finder2: makeMat: INT_RGB (1920x1080)
[debug] Finder2: makeMat: 3BYTE_BGR (1429x173)
[debug] Finder2: doFindImage: start (stdDev: 49,9256 mean: 748,438214)
[debug] Finder2: doFindImage: in original: %100,0000 (?70) 208 msec
[debug] Finder2: doFindImage: end 209 msec
[debug] Region: wait: 1639130662379.png appeared (M[10,235 1429x173]@S(0) S:1,00 C:724,321 [362 msec])
[debug] Device: Mouse: moved externally: now (192,358) was (902,478) (mouseMovedResponse 0)
[debug] CLICK on L[724,321]@S(0) (541 msec)
[debug] IDE: MenuAction.runSelection
[debug] Jython: use as default region: R[0,0 1920x1080]@S(0)
[debug] Image: BufferedImage: (1920, 1080)
[debug] Region: hover: R[0,0 1920x1080]@S(0)
[error] Mouse.move(): Mouse not useable (blocked)
[debug] IDE: MenuAction.runSelection
[debug] Jython: use as default region: R[0,0 1920x1080]@S(0)
[debug] Image: BufferedImage: (1920, 1080)
[error] Mouse.move(): Mouse not useable (blocked)

Revision history for this message
Daniel Shats (shantzzz) said :
#9

Any resolution to this?

Revision history for this message
Corentin Gauquier (cocowork) said :
#11

Bug still exists, any resolution ?

Revision history for this message
RaiMan (raimund-hocke) said :
#12

@Corentin:
since you are a new commenter to this question:
Pls. more info about your environment and your observations.

Revision history for this message
Corentin Gauquier (cocowork) said :
#13

@RaiMan
Hello, I'm working under Windows 10 OS, my problem is : the functions moveTo(Location(x,y)) and Mouse.wheel(WHEEL_DOWN, n) are sometimes throwing an error ( [error] Mouse: not useable (blocked) ), I don't know why it is happening that randomly, cause sometimes it will work perfectly and sometimes not. Note that I am using this while being on my desktop, chrome page that is not expended or in widows parameters, so I don't think any of those apps are blocking them in any way. Do you know why is that working like that ? Also i'm using SikulixIDE version 2.0.5.

(PS : thank for all the work you put in Sikuli, it is such a great application !)

Revision history for this message
Corentin Gauquier (cocowork) said (last edit ):
#14

Also, like in the original post, click is working so it si capable of moving the mouse.

(mb i'll edit my previous post next time)

Revision history for this message
HappyStainedToilet (happystainedtoiled) said :
#15

I'm having this same error too. Basically, if I do:

click(Location(569, 335))

It works as expected, however, if I change it to:

mouseMove(Location(569, 335))

It throws the "[error] Mouse.move(): Mouse not useable (blocked)" message.

It happens 100% of the times on my machine

----- System Info -----

OS: Windows 11
Sikulix: 2.0.5
Java: OpenJDK 20

Revision history for this message
RaiMan (raimund-hocke) said :
#16

Are you using HiRes monitors?

In my non-HiRes environment I cannot reproduce this problem.

If possible you might test with 2.0.6-snapshot (from GitHub).

Revision history for this message
franck le floch (flefloch) said :
#18

I dont know why this error happens randomly.
Reboot of the PC fixed the problem for me.

Can you help with this problem?

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

To post a message you must log in.