← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #269408]: Sikuli for mobile(Flash games)

 

Question #269408 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/269408

    Status: Open => Answered

RaiMan proposed the following answer:
-- 1. Is there any way i can you use same image for all the devices
If the image differs depending on the rendering in the device context, you get FindFailed:
- if width and/or height is different: not found in any case
- if only pixel content differs, not found depends on similarity score
see for details:
http://sikulix-2014.readthedocs.org/en/latest/basicinfo.html#sikulix-how-does-it-find-images-on-the-screen
- a general recommendation for the shots: 
as little background as possible towards the edges, concentrate on the key visual aspects, that makes the shot unique.

So if you run into the rendering trap, you need a different set of images for every different rendering situation.
see --3.

--2. Is there any way to directly run it in mobile devices??
--2. Can i run script in multiple devices simultaneously is there a way to do it?
Currently there is no solution to run SikuliX on mobile devices, only against emulators and by using VNC solutions (for that consult the net)

3. Can i have example for image library where it can be stored and i can use the same image name
To have image libraries that can be used in different environments, this is the easiest approach:
-- make your base library as the reference case as some images.sikuli in the SikuliX IDE with such content:
image1 = "image1.png"
image2 = "image2.png"
...
and have a naming concept for the images.

-- make a copy of the folder images.sikuli as imagesSet1.sikuli
... and recapture the images that need to be recaptured, because they are different

-- at runtime decide somehow about the imageset to be used

-- and use with Python scripting so for example:
if isBasicEnvironment:
    from images import *
elif isSet1Environment:
    from imageSet1 import *
...

or use
setBundlePath("absolute path to imageSet1.sikuli") 
instead of import

for the rest of your script just use the names of the one set of image
variables as defined in images.sikuli

... come back if you are using Java programming.

BTW:
the latest 1.1.0's IDE has a convenience feature:

if you write
image1 = 
in a line and then hit the respective buttons or use the instant shot feature, the image file will automatically be named image1.png and will silently overwrite an existing image1.png in the current .sikuli.

You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.