[1.1.0] JRuby: script run: RobotDesktop error (multi monitor)

Bug #1485581 reported by Giel Raijmakers on 2015-08-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sikuli
Undecided
RaiMan

Bug Description

I'm converting a scipt I made in Skiluli IDE to a script run by JRuby.
The script used to work in the Sikuli IDE, but now I get an error:

C:\jruby-9.0.0.0\bin>jruby "D:\tests\Github\FTAS\FTAS\example project\calc.sikuli\calc.rb"
[error] RobotDesktop: checkMousePosition: should be L(768,432)@S(0)[0,0 1536x864]
but after move is L(614,346)@S(0)[0,0 1536x864]
Possible cause in case you did not touch the mouse while script was running:
 Mouse actions are blocked generally or by the frontmost application.
You might try to run the SikuliX stuff as admin.
[error] RobotDesktop: checkMousePosition: should be L(2880,540)@S(1)[1920,0 1920x1080]
but after move is L(3601,675)@S(1)[1920,0 1920x1080]
Possible cause in case you did not touch the mouse while script was running:
 Mouse actions are blocked generally or by the frontmost application.
You might try to run the SikuliX stuff as admin.
[log] CLICK on L(1271,417)@S(0)[0,0 1536x864]
[log] CLICK on L(1321,417)@S(0)[0,0 1536x864]

I work with Sikuli 1.1.0.
I also work with two screens... but this wasn't an issue when I run the script in the IDE.

I do see the mouse move, so it does do something...

Can you help?

Cheers,
Giel

RaiMan (raimund-hocke) wrote :

Do you have the latest build of sikulixapi.jar in class path, when running with JRuby?

We emailed a bit about this issue.. lets do it on the form again.

I just installed the latest version sikulixsetup-1.1.0-20150824.230937-145-forsetup.
Still, I get the same kind of error.
I actually changed the platform.rb to set the sikulix_path to my folder to be sure it is directed correctly.

Any idea's?

Cheers,
Giel Raijmakers

RaiMan (raimund-hocke) wrote :

I suppose you have run setup with option 2 and configured the environment, so that sikulixapi.jar is on Java class path.

could you please send me to rmhdevelop<--at-->me.com:
- the setup log file
- the calc.rb

and tell me about your environment setup

BTW:
-- We emailed a bit about this issue
... where and when did we do that?

summary: - JRuby with Sikulli. RobotDesktop error
+ [1.1.0] JRuby: script run: RobotDesktop error
summary: - [1.1.0] JRuby: script run: RobotDesktop error
+ [1.1.0] JRuby: script run: RobotDesktop error (multi monitor)
Changed in sikuli:
status: New → Opinion
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
Giel Raijmakers (graijmakers) wrote :

first file, the calc.rb

Giel Raijmakers (graijmakers) wrote :

the setup log file.

I have emailed you 17-8.

Thanks for the support!

RaiMan (raimund-hocke) wrote :

thanks.

... missing the information on your overall setup, especially the way how you run your scripts with JRuby.

Giel Raijmakers (graijmakers) wrote :

I've got JRuby - 9.0.0.0 installed. I run it by:

C:\jruby-9.0.0.0>jruby "d:\tests\Github\FTAS\FTAS\example project\calc.sikuli\ca
lc.rb"

The overall setup... what are you looking for?
I installed SikuliX, option 1 and 2 with Ruby selected.

RaiMan (raimund-hocke) wrote :

How do you tell JRuby to use
D:\Sikuli\sikulixapi.jar

???

RaiMan (raimund-hocke) wrote :

BTW: until now, the IDE bundles JRuby 1.7.19

I just switched to the latest 1.7.22 (will be used from tomorrow on).

JRuby 9k is not jet tested with SikuliX.

Giel Raijmakers (graijmakers) wrote :

In the calc.rb:

require "sikulix"
include Sikulix

In the sikuliX gem there is a lib, platform.rb.
Here the sikulix_path is set to D:\sikuli\sikulixapi.jar

I also have added it to the environment variables, but havent changed the platform.rb.

RaiMan (raimund-hocke) wrote :

where did you get the SikuliX Gem ?
what version?

Giel Raijmakers (graijmakers) wrote :

list of gems:

*** LOCAL GEMS ***

jar-dependencies (0.1.15)
jruby-openssl (0.9.7 java)
jruby-win32ole (0.8.5)
json (1.8.0 java)
minitest (5.4.1)
power_assert (0.2.3)
psych (2.0.14.pre1 java)
rake (10.1.0)
rdoc (4.1.0)
ruby-maven (3.3.3)
ruby-maven-libs (3.3.3)
sikulix (1.1.0.3)
test-unit (3.0.3)

I got it with "gem install.... "

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers