hide cursor --- not possible with builtin features of SikuliX

Asked by jacob1988

I would like to hide cursor for few seconds?
how can I do this? :)

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
masuo (masuo-ohara) said :
#1

Which do you mean a keyboard cursor or a mouse pointer?
If you mean a keyboard cursor on input field, click window title or move focus to another object, so a keyboard cursor is disappeared.

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

... and of course you can move the mousepointer using hover to a place, where it is out of sight.

Revision history for this message
jacob1988 (jacob1988) said :
#3

mouse pointer. I have to click button "close" but sometimes mouse pointer is on button "close". so sikuli dosen't see button "close" and doesn't click.

Revision history for this message
masuo (masuo-ohara) said :
#4

Generally it is not a problem of mouse pointer.
If FindFailed exception is not occured, SikuliX has found something.
In this case, you have to confirm what SikuliX find out, what SikuliX work.
Understanding the situation leads to solutions.

For example
(1)If SikuliX find what you did not expecte, try Minimum Similarity
http://sikulix-2014.readthedocs.io/en/latest/pattern.html?highlight=similarity

(2)If SikuliX find and click what you expected, try moveMouse() and mouseDown().
http://sikulix-2014.readthedocs.io/en/latest/region.html?highlight=mouseMove

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

Generally the mousepointer is not part of the image captured to be searched.

So it does not matter, wether the mousepointer is over the searched image or not, since it is ignored anyways.

Be sure to use latest SikuliX version 1.1.1

About the other aspects: Masuo is your friend ;-)

Revision history for this message
digitalbise (andrea-bisello) said :
#6

i reached this forum searching for the same issue.
if i take a screenshot, and then the mouse cursor is over the screenshot, the image recognition fail.
This issue can't be avoided using sikulix to click small buttons because cursors can be a big part of the small button.
Really mouse cursor is ignored? if it should to be, maybe there is something wrong.

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

@digitalbise
Using latest SikuliX and latest Java?
see comment #5

Revision history for this message
digitalbise (andrea-bisello) said :
#8

I restored the system reinstalling everything, with robotframework-sikulilibrary taken by source and compiled by maven to have the last version and the problem look to be solver.

in order to hide cursor you can try something as

Hide Mouse Cursor
 Execute Javascript window.style = document.createElement("style");
 Execute Javascript window.style.appendChild(document.createTextNode(""));
 Execute Javascript document.head.appendChild(style);
 Execute Javascript window.style.sheet.insertRule("* { cursor: none !important }");

Can you help with this problem?

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

To post a message you must log in.