object recognition when running scripts in main

Asked by Matt Pappas

I have several individual scripts, all of which run without problem when I run them individually. I've now created a main script that references all of the individual script. The main script is working fine. However, I am noticing that almost every time I run main, it will fail at some point (not always the same place) because the individual script fails to find the pattern.

When it fails, I open the individual script and go to the bit map in question. I see that Sikuli recognizes the bit map and can locate it on screen through the matching screenview tab. I then run the individual script and it executes fine. I'm curious as to whether anyone else has seen this type of behavior. If so, is there some way to resolve the problem? Is there a preferred method of running multiple scripts in a sequence?

Thanks,
Matt

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

in most cases this are timing problems, that are not recognized when running the single script.

So depending on what kind of search you are using at this place, try something like that:

e.g. now:
click(some_image)

change to:
click(wait(some_image, 10))

In the first case, Sikuli only waits the standard 3 seconds for some_image to appear - which might be too short.

--- Is there a preferred method of running multiple scripts in a sequence?
Not really.
The easiest way: make a batch file, that runs every script from command line using
java -jar path-to-sikuli-script.jar path-to-your-script.sikuli

the path-to-.... have to be adjusted to your real situation.

Can you help with this problem?

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

To post a message you must log in.