Sikuli 2.0.4 support for windows 2019 server 64 bit

Asked by Selva on 2020-04-19

Hi All,
I am using sikuli for the long time from Win 2008, 2012 and 2016 now (all are 64 bit) and works welltill 2016 server
When I wanted to try Sikuli in windows 2019 -it identifies image but with wrong region (matched object high lighted in wrong location)
any idea on this issue

I am using Sikuli 2.0.4 api with java

as per document, sikuli support was mnetioned till windows 10, but works fine till windows server 2016 and any spcific reason for issue (wrong identification) in screen?

I want to use default similarity which I guess 0.7

Thanks
Selva D

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2020-04-19
Last reply:
2020-04-21
Selva (ganapathy-selva) said : #1

One more update. after restart, with new image capture, it is highlighting properly. But click did not happen.
Any idea on this ?

Thanks
selva D
Screen scr= new Screen();
Thread.sleep(2000);
  String Inner=sImagepath+"\\\\AppDesignerCommon\\\\selva.PNG" ;
  Match mat=scr.exists(Inner);
  System.out.println(mat);
  mat.highlight(1);
  scr.click(Inner);

RaiMan (raimund-hocke) said : #2

--- use
 scr.click(); //clicks the last match on scr

--- or
 scr.click(mat); //clicks the match

--- instead off
 scr.click(Inner);

... but if it does not really do the click it might be needed to run as administrator, because the app is blocking non-manual clicks

BTW: String Inner=sImagepath+"\\\\AppDesignerCommon\\\\selva.PNG" ;
results in <content-sImagepath>\\ AppDesignerCommon\\selva.PNG which is surely not what you want

this works also:
String Inner=sImagepath+"/AppDesignerCommon/selva.PNG" ;

... and this is safer:
File imageFolder = new File(sImagepath, "AppDesignerCommon")

and then:
Match mat=scr.exists(new File(imageFolder, "selva.PNG").getAbsolutePath());

or simply use the ImagePath feature:
ImagePath.add(imageFolder)

and then
Match mat=scr.exists("selva");

... since .png is added automatically if omitted.

BTW: on Windows in filenames uppercase/lowercase is not distinguishing - it is all the same

Selva (ganapathy-selva) said : #3

Hi RaiMan,
Thanks for the update. I hit with another issue .
--------------------------
[log] CLICK on L(857,437)@S(0)[0,0 1920x1080]
[error] RobotDesktop: checkMousePosition: should be L(857,437)@S(0)[0,0 1920x1080]
but after move is L(819,496)@S(0)[0,0 1920x1080]
Possible cause in case you did not touch the mouse while script was running:
 Mouse actions are blocked generally or by the frontmost application.
You might try to run the SikuliX stuff as admin.
L(960,540)@S(0)[0,0 1920x1080]
---------------------------------------
This is with sikulixapi and opened as admin user.
Now as workaroung, I want to get the mouse co ordinate which is assoclated with L (857,437) and
will do mouse operation again.
If there any exception for this other than FindFalied and how could it be efectively handled?
The object under identification is as smaller one but need to handle handle .

I did not manuualy handle the mouse and is it possible for any setting to do Mouse operation forcibly?

RaiMan (raimund-hocke) said : #4

HiDPI monitor or resolution not 100%?

There are problems with Java 8.

Can you help with this problem?

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

To post a message you must log in.