[1.0.1] multiMonitors jython dont find/click/... in screen --- fixed in 1.1.0

Bug #1459131 reported by SL5
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Committed
Critical
RaiMan

Bug Description

update: works with sikulix-1.1.0-20150524.231037-84 (update at 15-05-27_09-56)

hi all :) hug :)

i work with 4 monitors with different resulutions.
all works in java not in Jython.

may is should try "beta version is available: SikuliX-1.0.1" ?
is use Sikuli 1.0.1

highlight() draw red border for each monitor correct but shows only the default monitor inside.

n = getNumberScreens()
for ScreenId in range(n):
   reg.highlight(4) # red frame around for seconds

i tested with one image.
my image was not found and clicked at monitor 1,2,3, was found only monitor 1.

the java version works for me but the Jython version not. i would use the Jython version for webinar.

some additional informations:

('----------------- ScreenId = ', 0)
('reg: x, y, w, h = ', 0, 0, 1600, 900)
('reg: x, y, w, h = ', 0, 0, 1600, 900)
[log] highlight S(0)[0,0 1600x900] E:Y, T:3,0 for 4.0 secs

('----------------- ScreenId = ', 1)
('reg: x, y, w, h = ', 320, -720, 1280, 720)
('reg: x, y, w, h = ', 320, -720, 1280, 720)
[log] highlight S(1)[320,-720 1280x720] E:Y, T:3,0 for 4.0 secs

('----------------- ScreenId = ', 2)
('reg: x, y, w, h = ', 1600, -1080, 1920, 1080)
('reg: x, y, w, h = ', 1600, -1080, 1920, 1080)
[log] highlight S(2)[1600,-1080 1920x1080] E:Y, T:3,0 for 4.0 secs

('----------------- ScreenId = ', 3)
('reg: x, y, w, h = ', 1600, 0, 1366, 768)
('reg: x, y, w, h = ', 1600, 0, 1366, 768)
[log] highlight S(3)[1600,0 1366x768] E:Y, T:3,0 for 4.0 secs

print (Env.getSikuliVersion() )
n = getNumberScreens()
for ScreenId in range(n):
    print("----------------- ScreenId = ", ScreenId)
    reg = Screen(ScreenId)
    print("reg: x, y, w, h = ", reg.x , reg.y, reg.w, reg.h)
    x = reg.x
    y = reg.y
    topLeft = Location(x, y) # equivalent to
    topLeft = reg.getTopLeft()
    botRight = reg.getBottomRight()
    h = botRight.y - y
    w = botRight.x - x

    #reg.h = theWidth # equivalent to
    #reg.setH(h)
    #print(" x, y, w, h = ", x, y, w , h)
    reg.setH(h)
    reg.setY(y)
    #print("")
    print("reg: x, y, w, h = ", reg.x , reg.y, reg.w, reg.h)
    #reg.setAsScreen()
   # if ScreenId != 1:
    # continue
    reg.highlight(4) # dud red frame around for seconds
    #reg.hover(3)

   # reg.selectRegion("middle of region")

    # SCREEN = reg
    #Screen(0).setROI(reg)
    # setROI(reg)
    #mouse = new DesktopMouse()
   # reg.setAutoWaitTimeout(100000)

    if reg.exists("1432671701727.png"):
        print("found at ScreenId = " , ScreenId)
        reg.hover("1432671701727.png")
        sleep(1000)

Tags: 1.0.1
Revision history for this message
SL5 (sl5softwarelab) wrote :
SL5 (sl5softwarelab)
description: updated
description: updated
Revision history for this message
RaiMan (raimund-hocke) wrote :

so it is solved now?

RaiMan (raimund-hocke)
summary: - multiMonitors jython dont find/click/... in screen
+ [1.0.1] multiMonitors jython dont find/click/... in screen --- fixed in
+ 1.1.0
Changed in sikuli:
status: New → Fix Committed
importance: Undecided → Critical
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
Revision history for this message
SL5 (sl5softwarelab) wrote : Re: [Bug 1459131] Re: multiMonitors jython dont find/click/... in screen
Download full text (3.3 KiB)

yes its solved :)

BTW images inside sikuli IDE looks darker than before. but it works :)

great.

thanks.

Am 27.05.2015 10:25 schrieb "RaiMan" <email address hidden>:
>
> so it is solved now?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1459131
>
> Title:
> multiMonitors jython dont find/click/... in screen
>
> Status in Sikuli:
> New
>
> Bug description:
> update: works with sikulix-1.1.0-20150524.231037-84 (update at
> 15-05-27_09-56)
>
> hi all :) hug :)
>
> i work with 4 monitors with different resulutions.
> all works in java not in Jython.
>
> may is should try "beta version is available: SikuliX-1.0.1" ?
> is use Sikuli 1.0.1
>
> highlight() draw red border for each monitor correct but shows only
> the default monitor inside.
>
> n = getNumberScreens()
> for ScreenId in range(n):
> reg.highlight(4) # red frame around for seconds
>
> i tested with one image.
> my image was not found and clicked at monitor 1,2,3, was found only
monitor 1.
>
> the java version works for me but the Jython version not. i would use
> the Jython version for webinar.
>
> some additional informations:
>
> ('----------------- ScreenId = ', 0)
> ('reg: x, y, w, h = ', 0, 0, 1600, 900)
> ('reg: x, y, w, h = ', 0, 0, 1600, 900)
> [log] highlight S(0)[0,0 1600x900] E:Y, T:3,0 for 4.0 secs
>
> ('----------------- ScreenId = ', 1)
> ('reg: x, y, w, h = ', 320, -720, 1280, 720)
> ('reg: x, y, w, h = ', 320, -720, 1280, 720)
> [log] highlight S(1)[320,-720 1280x720] E:Y, T:3,0 for 4.0 secs
>
> ('----------------- ScreenId = ', 2)
> ('reg: x, y, w, h = ', 1600, -1080, 1920, 1080)
> ('reg: x, y, w, h = ', 1600, -1080, 1920, 1080)
> [log] highlight S(2)[1600,-1080 1920x1080] E:Y, T:3,0 for 4.0 secs
>
> ('----------------- ScreenId = ', 3)
> ('reg: x, y, w, h = ', 1600, 0, 1366, 768)
> ('reg: x, y, w, h = ', 1600, 0, 1366, 768)
> [log] highlight S(3)[1600,0 1366x768] E:Y, T:3,0 for 4.0 secs
>
> print (Env.getSikuliVersion() )
> n = getNumberScreens()
> for ScreenId in range(n):
> print("----------------- ScreenId = ", ScreenId)
> reg = Screen(ScreenId)
> print("reg: x, y, w, h = ", reg.x , reg.y, reg.w, reg.h)
> x = reg.x
> y = reg.y
> topLeft = Location(x, y) # equivalent to
> topLeft = reg.getTopLeft()
> botRight = reg.getBottomRight()
> h = botRight.y - y
> w = botRight.x - x
>
> #reg.h = theWidth # equivalent to
> #reg.setH(h)
> #print(" x, y, w, h = ", x, y, w , h)
> reg.setH(h)
> reg.setY(y)
> #print("")
> print("reg: x, y, w, h = ", reg.x , reg.y, reg.w, reg.h)
> #reg.setAsScreen()
> # if ScreenId != 1:
> # continue
> reg.highlight(4) # dud red frame around for seconds
> #reg.hover(3)
>
> # reg.selectRegion("middle of region")
>
> # SCREEN = reg
> #Screen(0).setROI(reg)
> # setROI(reg)
> #mouse = new DesktopMouse()
> # reg.setAutoWaitTimeout(100000)
>
> if reg.exists("1432671701727.png"):
> print("found at ScreenId = " , Scr...

Read more...

Revision history for this message
SL5 (sl5softwarelab) wrote :

today i updated and checked ocr recognition.
and i stated the same script. bad results :-O

SikuliX 1.1.0
('----------------- ScreenId = ', 0)
('reg: x, y, w, h = ', 0, 0, 1600, 900)
('reg: x, y, w, h = ', 0, 0, 1600, 899)
[log] highlight S(0)[0,0 1600x900] E:Y, T:3,0 for 4.0 secs

('----------------- ScreenId = ', 1)
('reg: x, y, w, h = ', 1600, 0, 1366, 768)
('reg: x, y, w, h = ', 1600, 0, 1366, 767)
[log] highlight S(1)[1600,0 1366x768] E:Y, T:3,0 for 4.0 secs

('----------------- ScreenId = ', 2)
('reg: x, y, w, h = ', 1600, 0, 1366, 768)
('reg: x, y, w, h = ', 1600, 0, 1366, 767)
[log] highlight S(1)[1600,0 1366x768] E:Y, T:3,0 for 4.0 secs

('----------------- ScreenId = ', 3)
('reg: x, y, w, h = ', 1600, 0, 1366, 768)
('reg: x, y, w, h = ', 1600, 0, 1366, 767)
[log] highlight S(1)[1600,0 1366x768] E:Y, T:3,0 for 4.0 secs

Revision history for this message
RaiMan (raimund-hocke) wrote :

could you just start the IDE from command line with the parameters
runsikulix.cmd -d 3 -c

and post the startup log.

No need to run anything.

Revision history for this message
SL5 (sl5softwarelab) wrote :
Download full text (11.6 KiB)

+++ running this Java
+++ trying to run SikuliX
+++ using: -Xms64M -Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine -jar E:\fre\public\HtmlDevelop\Java\SikuliX\sikulix.jar -d 3 -c
[debug] RunTimeINIT: loadOptions: check: E:\fre\public\HtmlDevelop\Java\SikuliX
[debug] RunTimeINIT: loadOptions: check: C:\Users\lauffer
[debug] RunTimeINIT: loadOptions: check: C:\Users\lauffer\AppData\Roaming\Sikulix\SikulixStore
[debug] RunTimeINIT: global init: entering as: IDE
[debug] RunTimeINIT: ScreenDevice 0 has (0,0) --- will be primary Screen(0)
[debug] RunTimeINIT: fSxBase: E:\fre\public\HtmlDevelop\Java\SikuliX
[debug] RunTimeINIT: runs as sikulix.jar in: E:\fre\public\HtmlDevelop\Java\SikuliX
[debug] RunTimeINIT: exists libs folder at: C:\Users\lauffer\AppData\Roaming\Sikulix\SikulixLibs_201506040100
[debug] RunTimeINIT: addToWindowsSystemPath: added to systempath:
C:\Users\lauffer\AppData\Roaming\Sikulix\SikulixLibs_201506040100
[debug] RunTimeINIT: checkJavaUsrPath: added to ClassLoader.usrPaths
***** show environment for IDE (build 201506040100)
user.home: C:\Users\lauffer
user.dir (work dir): E:\fre\public\HtmlDevelop\Java\SikuliX
user.name: lauffer
java.io.tmpdir: C:\Users\lauffer\AppData\Local\Temp
running 64Bit on Windows (6.1) from a jar
java 8-64 version 1.8.0_45-b15 vm 25.45-b02 class 52.0 arch amd64
app data folder: C:\Users\lauffer\AppData\Roaming\Sikulix
libs folder: C:\Users\lauffer\AppData\Roaming\Sikulix\SikulixLibs_201506040100
executing jar: E:\fre\public\HtmlDevelop\Java\SikuliX\sikulix.jar
*** classpath dump sikulix
  0: /E:/fre/public/HtmlDevelop/Java/SikuliX/sikulix.jar
*** classpath dump end
***** show environment end
[debug] RunTimeIDE: global init: leaving
[debug] RunTimeIDE: initIDEbefore: entering
[debug] RunTimeIDE: initIDEbefore: leaving
[debug] init user preferences
[debug] IDE: running with Locale: de_DE
[debug] --- Sikuli parameters ---
[debug] 1: -d
[debug] 2: 3
[debug] 3: -c
[info] HotkeyManager: add Capture Hotkey: STRG+UMSCHALT 2 (50, 3)
[debug] HotkeyManager: add Capture Hotkey: STRG+UMSCHALT 2 (50, 3)
[info] HotkeyManager: add Abort Hotkey: ALT+UMSCHALT C (67, 9)
[debug] HotkeyManager: add Abort Hotkey: ALT+UMSCHALT C (67, 9)
[debug] ScriptingSupport: initScriptingSupport: enter
[debug] JythonSupport: init: starting
[debug] JythonSupport: init: success
[debug] JythonSupport: ***** Jython sys.path
 0: E:\fre\public\HtmlDevelop\Java\SikuliX\Lib
 1: E:\fre\public\HtmlDevelop\Java\SikuliX\sikulix.jar\Lib
 2: __classpath__
 3: __pyclasspath__/
[debug] JythonSupport: ***** Jython sys.path end
[debug] Jython: sikuli: Sikuli: starting init
[debug] RunTimeIDE: loadLib: VisionProxy.dll
[debug] Mouse: init
[debug] KeyBoard: init
[debug] Screen: initScreens: multi monitor mouse check
[debug] Screen: *** checking: S(0)[0,0 1600x900] center: (800, 450) --- OK
[debug] Screen: *** checking: S(1)[1600,0 1366x768] center: (2283, 384) --- OK
[debug] Screen: *** checking: S(2)[1600,0 1366x768] center: (2283, 384) --- OK
[debug] Screen: *** checking: S(3)[1600,0 1366x768] center: (2283, 384) --- OK
[debug] RunTimeIDE: loadLib: WinUtil.dll
[debug] Jython: requested to use as default region: R[0,0 1600x900]@S(0)
[debug] Jython: s...

Revision history for this message
SL5 (sl5softwarelab) wrote :
Revision history for this message
SL5 (sl5softwarelab) wrote :

here you gut working versioin in Autohotkey https://gist.github.com/sl5net/d837ca8ef18fbf05e8cc
it generates a txt file.
and if you want the video of the creating process: http://youtu.be/u0h0CydO03k
the video is may interesting for Autohotkey users. and the gist interesting if you want generate monitor text file.
hope that helps devoloping.
thanks & best regards
Se

Revision history for this message
RaiMan (raimund-hocke) wrote :

ok, thanks.

... and what is the text file content with your monitor setup?

Revision history for this message
SL5 (sl5softwarelab) wrote :
Revision history for this message
RaiMan (raimund-hocke) wrote :

ok, might have been misunderstanding:

the content of the text file, that is produced by the AutoHotKey script for your monitor setup?

Revision history for this message
SL5 (sl5softwarelab) wrote :
Revision history for this message
RaiMan (raimund-hocke) wrote :

@ SL5:
see bug 1462935

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.