About Guide: spotlight doesn't work in rectangle?

Asked by Calvin

Hi, I been playing around with the guide and it's definitely a great tool to work with.
I tried the spotlight and it work by default ('circle'). But it didn't work when I use the 'rectangle'.

spotlight("target.png", 'rectangle' )

What seems to be the issue?

Also, how can i edit the text and the tooltip's color box? By reading this thread: https://answers.launchpad.net/sikuli/+question/211340
It seems I need to get to the source file from you?

Thanks and regards
Calvin

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Calvin
Solved:
Last query:
Last reply:

This question was reopened

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

I will setup a git-hub location later today and come back with the link.

Revision history for this message
RaiMan (raimund-hocke) said :
#2
Revision history for this message
Calvin (calvin-v99) said :
#3

Thanks RaiMan, that solved my question.

Revision history for this message
Calvin (calvin-v99) said :
#4

It seems I met the same block road as Steffen (steffen-be).
I do not have the option "Java project from existing sources" (only "java project" and "java project from existing ant buildfile").
How should i go with that?

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

Ok, then we are talking about Eclipse:
- new Java project
- give it a name and click next
- in the source tab below you find "Link additional sources"
- in the dialog coming up you can select a source folder in the file system and give it a name for your Eclipse project view

Revision history for this message
Calvin (calvin-v99) said :
#6

Hmm, doesn't seem to work. Maybe i'll try out with netbeans.

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

what is the problem?

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

just checked again, this works:
- make an empty java project
- delete the existing src folder from the project view
- go to project properties -> java build path
- again the tab source
- button: Link source
- select the src folder in the guide sources and finish
- click ok in the source tab

Revision history for this message
Calvin (calvin-v99) said :
#9

Hi Raiman, Sorry for the late reply, I had been away for another project.

I tried the steps but there's a lot of errors in eclispe.

eg.

Access restriction: The type RSACipher is not accessible due to restriction on required library
C:\Program Files (x86)\Java\jre6\lib\ext\sunjce_provider.jar SikuliGuideArea.java
/guide/src/org/sikuli/guide line 19 Java Problem

could be due to JRE?

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

the mentioned line 19 in SikuliGuideArea.java is
import com.sun.crypto.provider.RSACipher;

on a first glance, I cannot see, what it is used for or used at all.
So comment it out or find the reason in your installation for the complaint.

Revision history for this message
Calvin (calvin-v99) said :
#11

I suspect i may have missed a step. I need to add the sikuli script.jar into my project library. Am i right

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

Yes, sikuli-script.jar is always needed, since it contains the basic API.
But this should have nothing to do with the above import problem.

Using Java 7?

Revision history for this message
Calvin (calvin-v99) said :
#13

I using JRE System Library [JavaSE - 1.6]

I commented the "import com.sun.crypto.provider.RSACipher;" and also added the following jar files to library and clean the build.

Junit-4.8.2.jar
sikuli-script.jar
simple-xml-2.6.1.jar

Errors managed to drop from 1100 to 33 (sigh of relief)

Errors left:

CycleStrategy cannot be resolved to a type
Persister cannot be resolved to a type
Serializer cannot be resolved to a type
Strategy cannot be resolved to a type
Test cannot be resolved to a type
The method setSimilarity(float) is undefined for the type Pattern
The import com.sun.medialib cannot be resolved

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

--- the error
The method setSimilarity(float) is undefined for the type Pattern

can be fixed:
by changing setSimilarity to similar

--- The import com.sun.medialib cannot be resolved
try to comment it out

--- the other errors
I cannot see in my sources

Revision history for this message
Calvin (calvin-v99) said :
#15

down to 30 errors. All related to:

CycleStrategy cannot be resolved to a type
Persister cannot be resolved to a type
Serializer cannot be resolved to a type
Strategy cannot be resolved to a type
Test cannot be resolved to a type

Sigh..your sources is working fine using ecillispe?

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

Has nothing to do with Eclipse.

can you give me the error messages from Eclipse (run a build and send me the error output) ?

or post it here.

Revision history for this message
Calvin (calvin-v99) said :
#17

Hi Raiman,
Kindly see attached.
Thanks and RegardsCalvin
> To: <email address hidden>
> From: <email address hidden>
> Subject: Re: [Question #214146]: About Guide: spotlight doesn't work in rectangle?
> Date: Mon, 26 Nov 2012 10:35:53 +0000
>
> Your question #214146 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/214146
>
> RaiMan proposed the following answer:
> the mentioned line 19 in SikuliGuideArea.java is
> import com.sun.crypto.provider.RSACipher;
>
> on a first glance, I cannot see, what it is used for or used at all.
> So comment it out or find the reason in your installation for the complaint.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/sikuli/+question/214146/+confirm?answer_id=9
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/sikuli/+question/214146
>
> You received this question notification because you asked the question.

Revision history for this message
Calvin (calvin-v99) said :
#18

hi Raiman, check your email :)

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

ok, got it.

the first block has something to do with your eclipse installation (plugin face and other stuff). You have to check, what these mean, but has nothing to do with Sikuli Guide.

The second block denoting the compilation errors are all in module SklTest and are resolved in the two libs
junit-4.8.2.jar
simple-xml-2.6.1.jar

So you either take care, that thes 2 libs are in yore project libraries, or you remove the SklTest.java from your sources (it is not really needed, since it contains the test cases used by the developer).

Revision history for this message
Calvin (calvin-v99) said :
#20

I think it's working. Thanks for the help, Raiman~ really appreciated it.