Sikuli Script working fine on machine its created , but not identifying images on another environment.

Asked by AliSaggu

How to make the script multi environment compatible ?

I created the Script using Sikuli X 1.0 RC3 , Remotely connecting for a server running Windows 2007 Server and its working fine.
Im trying to run the same script on another machine running windows 7 , but it does not identify certain Images and crashes giving error <type 'org.sikuli.script.FindFailed'> .

Please suggest as this script needs to run on many machines .

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

This is a common problem with Sikuli.

If the images do not match on other machines, you usually need different images for these other environments.

But first you should analyze the environment diffs with respect to your captured images and find out, wether you can use optimized images or other approaches (e.g. relative positions to working images/matches with rather fixed GUI's, which might dramatically reduce the number of needed images).

Revision history for this message
AliSaggu (ali-saggu) said :
#2

Thanks RaiMan for your help here .

Is there any way , I can use region based searches and region specified clicks (Target OfSet) so that my script could be independent of screen resolution , image rendering / size and OS environment ?

I tried using Region.inside().find() , but even that requires a change of similarity threshold from machine to machine , when identifying images .

Thanks .

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

find always has this problem - using regions is only a matter of reliability and speed - since it always uses imgage match (comparison) on the pixel level.

--- what I meant with relative positions is ...
(assuming you have a rather fixed GUI in that the elements positions are rather fixed in relation to some key points in the GUI's visible area)
Then you could find a few key visuals and all the other needed points are calculated and defined via offsets to this reference points.
The new version 1.0.1 has lot of helpful functions (sorry, but they are not yet in the docs, you have to dig through the actual information that comes with the release), to easily achieve this.

... but I admit: it is a bit more effort in the forefront ;-)

Can you help with this problem?

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

To post a message you must log in.