Sikuli on different Resolutions

Asked by Jaspreet Singh

Hello,

Sikuli is image based tool, I would like to know then how sikuli sripts runs perfectly fine for same software in below resolutions
1)1280x800
2)1024x768
3)800x600

I explain more, I have recorded script in 1280x800 , I am changing resolution to 800x600,, image is changes (bigger) but script runs fine..Can you please tell me reason ?

Thanks.
Jas

Question information

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

Sikuli works on a pixel by pixel base. So resolution does not matter, as longs the pixel information itself stays the same (no different rendering in different screen resolutions).

Revision history for this message
Jaspreet Singh (js-sabharwal) said :
#2

Thanks for Prompt reply RaiMan,

I have recorded my script on first release RC1 . now next week I get RC2 which is same GUI, same buttons ... everything same, but script does not work on RC2.

Can you please tell me possible reasons of script failure and how can I resolve it?

Thanks in Adv.

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

-- RC1/RC2 of Sikuli X ????

-- tell me possible reasons of script failure
what errors do you get?

Revision history for this message
Jaspreet Singh (js-sabharwal) said :
#4

No , I mean RC1 RC2 of my software, I am using Sikuli-X-1.0rc2-win32.exe.

I have recorded my script with MySoftware (First release) . now next week I get second release which is same GUI, same buttons ... everything same no changes, but script does not work on second release. I am not getting why its not working.. ideally it should work.

LOGS
--------------------------------------------------------------------------------------------------------------------------------------------
[log] App.open C:\Program Files\InternetEverywhere\InternetEverywhere.exe(3904)
[log] App.focus Internet Everywhere(0) #0
[log] CLICK on (402,189)
[log] App.focus Internet Everywhere(0) #0
[log] CLICK on (506,236)
[log] CLICK on (435,236)
[log] CLICK on (610,167)
[error] Stopped [error] An error occurs at line 37 [error] Error message: Traceback (most recent call last):
File "C:\Users\admin\AppData\Local\Temp\sikuli-tmp6920235205312888072.py", line 37, in
click("1313482269295.png") File "C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\Region.py", line 119, in click Line 39, in
file C:\Users\admin\AppData\Local\Temp\sikuli-tmp6920235205312888072.py
at org.sikuli.script.Region.handleFindFailed(Region.java:349)
at org.sikuli.script.Region.wait(Region.java:420)
at org.python.proxies.sikuli.Region$Region$1.super__wait(Unknown Source)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) org.sikuli.script.FindFailed: FindFailed: can not find 1313482269295.png Line 39, in file C:\Users\admin\AppData\Local\Temp\sikuli-tmp6920235205312888072.py
=========================================================
It says " FindFailed: can not find 1313482269295.png " but I have cross verified image "1313482269295.png" is there.

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

since it seems, that other images have worked before in your script, you seem to have a problem on your new release with image "1313482269295.png".

is it a timing problem? does it take longer than 3 seconds for "1313482269295.png" to come up?

If this does not help, you have to check the image separately:

- drive your app manually to the failing situation
- run the following in the Sikuli IDE:
setBundlepath(absolute path to your failing script.sikuli)
m = find("1313482269295.png")

and see what happens experimenting with this image.

Revision history for this message
Jaspreet Singh (js-sabharwal) said :
#6

:( No, there is no timing problem.

setBundlePath doesnt return anything ... its not getting executed

I can see Iv.png image exists in "C:\SikuliScripts\MyInfoPreference.sikuli", I am running below code from Sikuli IDE
==========================================
setBundlePath("C:\SikuliScripts\MyInfoPreference.sikuli")
a = find("Iv.png")
print a
==========================================

[error] Stopped [error] An error occurs at line 2 [error] Error message: Traceback (most recent call last): File "C:\DOCUME~1\MTVB5075\LOCALS~1\Temp\sikuli-tmp8565736801962996933.py", line 2, in a = find("Iv.png") File "E:\Installations\Sikuli\Sikuli X\sikuli-script.jar\Lib\sikuli\Region.py", line 59, in find Line 3, in
file C:\DOCUME~1\MTVB5075\LOCALS~1\Temp\sikuli-tmp8565736801962996933.py
at org.sikuli.script.Region.handleFindFailed(Region.java:349) at org.sikuli.script.Region.wait(Region.java:420)
at org.python.proxies.sikuli.Region$Region$1.super__wait(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
org.sikuli.script.FindFailed: FindFailed: can not find Iv.png Line 3, in
file C:\DOCUME~1\MTVB5075\LOCALS~1\Temp\sikuli-tmp8565736801962996933.py

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

you have to use either \\ double backslashes or raw strings r"some text containing a \ backslash".

to check wether the path to your images is set correctly:
print getBundlePath()

so use this:

setBundlePath(r"C:\SikuliScripts\MyInfoPreference.sikuli")
print getBundlePath()
a = find("Iv.png")
print a

Revision history for this message
Jaspreet Singh (js-sabharwal) said :
#8

Thanks Rai, problem resolved, actually there was a font difference my software deliveries ..!

Revision history for this message
Jaspreet Singh (js-sabharwal) said :
#9

Thanks RaiMan, that solved my question.