Loading and reloading scripts shows or doesn't show images

Asked by Dale

I have the setting "delete unused images" UNchecked, so my images should never be deleted.

Yet, when I load a script, many times I'll have file names instead of images showing.

If I close and re-open a script, more images usually show-up, but some images are more stubborn, and don't show.

If I rename the image in the script (for instance, add an "a" to the file name), and also add the "a" to the file name in the script, then close and re-open the script, the image will probably finally show.

Is there a way to somehow flush the cache, force a compile, SOMETHING, where I could get this to work better?

I'd be willing to write code that would run before the IDE opened to make sure that, when I want to edit a script, I can actually see the images without all of the shuck and jive.

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
Best RaiMan (raimund-hocke) said :
#1

Try version 1.1.1 (http://sikulix.com)

Revision history for this message
Dale (sengsational) said :
#2

Thank you for the quick response and for maintaining this very handy application.

It appears that the images all get loaded now.

If you're ever in Charlotte, NC, I'll buy you a beer.

Revision history for this message
Dale (sengsational) said :
#3

Thanks RaiMan, that solved my question.

Revision history for this message
Alex Lunyov (lunyov-av) said :
#4

Hi, it's nice to come back here (would like report some possible bugs). So, I updated my Sikuli to 1.1.1 2017-03-03 and I noticed that updating images didn't work as expected (as it had worked before).

1. I create some image visual:

img = "img.png" # using screen-capture button

2. Then I decide to change this image, type Backspace to delete old image:

img = # img.png should be deleted, shouldn't it?

3. I choose another part of the screen using screen-capture button :

img = "img.png" #

Surprisingly I see my _old image_ instead of the new one. But when I save the project and reopen it in Sikuli IDE I do see the new image.

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

@Alex
thanks for finding. Made it a bug
The reason behind:
changing the imagefile content is not reflected in image caching (which is on by default)

Revision history for this message
Alex Lunyov (lunyov-av) said :
#6

Ok!

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

@Alex:
fixed. the new version is on the nightly page.

Revision history for this message
Alex Lunyov (lunyov-av) said :
#8

@RaiMan, thanks!

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

@Alex:
tested?

Revision history for this message
Alex Lunyov (lunyov-av) said :
#10

Yes, RaiMan, I've tested, this works well.
Some related problem (just to let you know if it is a bug).

On Windows 7: I press the image-capture button and my IDE with script text disappeares and I see my visual targets to be used in the script.
On Windows 10: I do the same, but IDE window doesn't dissappear, it disturbes. I need to use ctrl+shift+2 combination to capture image from the target applications.

Revision history for this message
Alex Lunyov (lunyov-av) said :
#11

*shortly speaking, I use this key combination instead of using image-capture button because the IDE window screens my visual targets while capturing mode is running.

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

@Alex
Thanks for confirming.

if the IDE does not disappear completely, after clicking the capture button, either:
- switch of window animation in Windows setup
- increase the pause-before-shot in the IDE preferences

Revision history for this message
Alex Lunyov (lunyov-av) said :
#13

The second advice resolved my issue! :)