Extensions to PNG files show up with an image, but when I close Sikuli and reopen it, the image disappears and only leaves behind the file extension name, but no link.

Asked by Eric Brock

I have having an issue where extensions to PNG files show up with an image, but when I close Sikuli and reopen it, the image disappears and only leaves behind the file extension name, but no link to the actual PNG files.

Here is an example where I am telling Sikuli to click on a button that says "Go" in the program I am using, HumMod:

First I take the screenshot of the desired portion of the window for sikuli to click on. For some reason I havent been able to find out how to move the location that sikuli dumps the PNG files after it takes a snapshot, so I have to create a link to manually designate a different location. SO, I move the PNG file to the folder that I need it to be in, then I go into Sikuli and manually input the new designation. Here is what it would look like:
                 click( "C:\\DigitalAstronaut\\Case Studies\\PNG Library\\Go.png" )

When I click the green arrow to run the script, everything works fine. So, then I close Sikuli, but when I come back to open it up, all of the file extension links as shown above have been replaced simply by the image that they represent. Now this is not a problem, because they still take the link to where I have the actual PNG files, so all is good and, once again, everything works as expected. So now I close Sikuli again, but this time when I open it up, neither the extension link or PNG image show up. All that shows up is the names of the PNG files that the links represented, but they dont lead anywhere. So when I run the script, it cant even make it past the first action because there are no PNGs to draw from. So I go in and add the rest of the information needed to link the script to the corresponding PNGs, but this only starts the entire process over again.

This problem is rather frustrating and I cant seem to find an obvious solution to it, so if there is anyone who could offer a suggestion, I would greatly appreciate it!

Thanks!

Question information

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

Try to use setBundlePath(). This is the path to the folder, where Sikuli should look for the captured images (in the standard this points to the folder, where the script resides)

But be aware, that images captured with the IDE are still stored in the script folder. So you have to move them to your picture folder before running the script.

One more thing: avoid blanks in your folder names. Just write it like your folder "DigitalAstronaut". I remember, that there where problems.

Revision history for this message
Eric Brock (eric-brock21) said :
#2

Ok thanks I will it a try!

Revision history for this message
Eric Brock (eric-brock21) said :
#3

*give it a try!

Revision history for this message
Eric Brock (eric-brock21) said :
#4

This worked wonderfully! Thanks You for the suggestion!