Problem with switchApp not switching to the desired application

Asked by Michael

I feel like a dufus. I've tried to use Sikuli on several occasions but I keep having problems with switchApp. It doesn't every seem to take the script to the correct application.

I'm running Windows 7 and just updated Java to Java 6 Update 20 (from Update 16) in case that made a difference.

I've tried searching the documentation and Answers but they didn't seem to help. Among others, I have looked at https://answers.launchpad.net/sikuli/+question/102169 and https://answers.launchpad.net/sikuli/+question/102131

To simplify things, I've tried to boil it down to something basic below. Word was added later as a test as Firefox wasn't providing any success. I've added more commands but as these ones don't work, I didn't see a point in including them.

switchApp("Word")
switchApp("Firefox")
click(image )
click(image )

When I run the script, nothing happens and I get a red diamond next to line #1. It never switches to Word (or Firefox) This same issue has happened to me on two different Windows 7 machines.

If anyone has any insights about how to help this work, I'd be very thrilled.

Thanks in advance!

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Michael
Solved:
Last query:
Last reply:
Revision history for this message
Tsung-Hsiang Chang (vgod) said :
#1

Are you running a 64bit Windows? If so, I guess you are not using a 32bit Java. (Sikuli only runs on a 32bit JVM on Windows.)
It not, that would be a bug of Sikuli and I need more details to reproduce this bug.

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

Tsung-Hsiang,

Thank you for your help!

I'm actually running 32-bit Windows 7 Enterprise. I'd installed the default version of Java (there appears that a separate manual process is required for the 64-bit version on Java's site). I'm running Sikuli 0.10.1.

Nonetheless, I removed Java 6 Update 20 and installed Java Runtime Environment 1.6.0.20 (32-bit) from FileHippo.com.

It now works! I've floundered with Sikuli for some time and now I can finally use the product.

Thanks so much for identifying the problem!