Sikuli guide in a multi-monitor environment

Asked by DI BENEDETTO

Hello,

I can click on an element on my third screen but I can not use the text function in my third screen. Is there a code that could achieve that please ?

you will find below my code based on sikuilxapi

>>> sc1=Screen(0) => OK
>>> sc2=Screen(1) => OK
>>> sc3=Screen(2) => OK
>>> res=sc3.find("button") => OK
>>> myText=text(res,"fdsfsfd2") => OK
>>> click(res) => OK
[log] CLICK on L[2506,190]@S(2) (539 msec)
>>> show(5) => KO but ok if res is in the main screen by using sc1
u'timeout'

Question information

Language:
English Edit question
Status:
Expired
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
DI BENEDETTO (diblud13) said :
#1

Context : windows 10, sikulixapi-2.0.5

Revision history for this message
DI BENEDETTO (diblud13) said :
#2

I was looking by curiosity to the recent other tickets and one of their answers could be a solution.
Maybe simply use(Screen(2))
I would try it tomorrow.
If it is working, it could be nice to implement it in guide.

Revision history for this message
DI BENEDETTO (diblud13) said :
#3

unfortunately, it does not work

Revision history for this message
DI BENEDETTO (diblud13) said :
#4

Modifying the primary screen is a solution but few elegant. A solution via sikuli is welcome : )

Revision history for this message
DI BENEDETTO (diblud13) said :
#5

this code is working:
import org.sikuli.script.SikulixForJython
from sikuli import *
from guide import *
ImagePath.setBundlePath("C:\\Users\\LudovicDiBenedetto\\Documents\\wrk\\sikuli\\img")
res=Screen(2).find("totoIsBack")
g3=Guide(res)
g3.text("textToto")
g3.showNow(3)

It needs to be customized to get the same behaviour than the native show function (for example with this code the text container size is not dynamic depending on the text size, it leads to a truncated display)
I will look at it if I have time. In the meantime every elegant and robust solution are welcome : )

Revision history for this message
Launchpad Janitor (janitor) said :
#6

This question was expired because it remained in the 'Open' state without activity for the last 15 days.