spotlight.png looks like a file but not on disk osx

Asked by Michael Tibbatts

I am trying to carry out the "Hello World" code example found at http://doc.sikuli.org/faq/030-java-dev.html
using Eclipse.
Though after following all the necessary steps when I run the program I receive the following error.

[error] imgs/spotlight.png looks like a file, but not on disk. Assume it's text.
[error] Region.find(text): text search is currently switched offFindFailed: Text search currently switched off
  Line 1671, in file Region.java

any suggestions as to why this may have occurred?

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

this should work, if in your Eclipse project at the root level there is the folder imgs containing spotlight.png

for version 1.0.1:
https://github.com/RaiMan/SikuliX-API/wiki/Usage-in-Java-programming

Revision history for this message
Michael Tibbatts (michaeltibbatts) said :
#2

I have now added the images to the imgs folder, the images where obtained using command, shift + 4 to obtain the cropped image.
Though I now get a new error

FindFailed: can not find imgs/spotlight.png on the screen.
  Line 1574, in file Region.java

Would this have something to do with the screen size?

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

screen size does not matter, as long as the given image as it is rendered on the current screen has the same size in pixels as the given image.
Are you working on a Retina display?

Can you help with this problem?

Provide an answer of your own, or ask Michael Tibbatts for more information if necessary.

To post a message you must log in.