Re: [Sikuli-driver] [Question #691058]: How to move sikulixide-2.0.4.jar to new location and still use OCR

2020-06-18 Thread Launchpad Janitor
Question #691058 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691058

Status: Open => Expired

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

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #691355]: Remote PC without Monitor: RobotDesktop: checkMousePosition

2020-06-18 Thread Simon Fong
Question #691355 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691355

Simon Fong confirmed that the question is solved:
Thanks RaiMan, that solved my question.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #691355]: Remote PC without Monitor: RobotDesktop: checkMousePosition

2020-06-18 Thread Simon Fong
Question #691355 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691355

Status: Answered => Solved

Simon Fong confirmed that the question is solved:
good news to me is, seem my NUC  can emulate a screen. (maybe win10,
idk)

I disabled Sign-in options and set it never turn off and sleep in Win10.

After I had teamviewer connected, I had to adjust the screen resolution
from 1024 back to 1440, then sikuli works even after I disconnect &
reboot it. (seem this was the actual problem...)

However, I have to adjust some of the images to lower accuracy via
teamviewer. I suppose I can live with that.

Thanks for your advice. I will buy a Dummy plug in the meantime for in
case...

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #691383]: how to use OCR.readLines?

2020-06-18 Thread matteoa
Question #691383 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691383

matteoa posted a new comment:
Hi RaiMan,
thanks for prompt response!!
I've tried your snippet, slightly modified (the list does not exists and PSM 6 
is absolutely needed):
textOCR.setPSM(6)
reg = selectRegion()
lines = reg.textLines()
for line in lines:
uprint(line)

Works perfectly!!
Thanks!!!

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #691383]: how to use OCR.readLines?

2020-06-18 Thread matteoa
Question #691383 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691383

Status: Answered => Solved

matteoa confirmed that the question is solved:
Thanks RaiMan, this solved my problem!

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #691363]: When I tried taking screenshoot, the screen turned black. I use Ubuntu 18.04 on Dell laptop without any other monitor attached.

2020-06-18 Thread RaiMan
Question #691363 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691363

Description changed to:
Hi.

When I tried taking screenshoot, the screen turned black. I use Ubuntu
18.04 on Dell laptop without any other monitor attached. I use openJDK
11.

I tried to follow question 127102 
(https://answers.launchpad.net/sikuli/+question/127102)
and using the script in comment #3.

the message result is like this:

java.awt.Rectangle[x=0,y=0,width=1920,height=1080]
[error] Screen(1) not in valid range 0 to 0 - using primary 0
java.awt.Rectangle[x=0,y=0,width=1920,height=1080]
-- hover test s0
L[100,100]@S(0)
left and laptop

-- hover test s1
L[100,100]@S(0)
left and laptop

-- capture test s0
black
-- capture test s1
black
-- selectRegion test s0
None
L[466,405]@S(0)
-- click test s0
L[966,545]@S(0)
-- click test s1
L[955,580]@S(0)

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #691363]: When I tried taking screenshoot, the screen turned black. I use Ubuntu 18.04 on Dell laptop without any other monitor attached.

2020-06-18 Thread RaiMan
Question #691363 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691363

Description changed to:
Hi.

When I tried taking screenshoot, the screen turned black. I use Ubuntu
18.04 on Dell laptop without any other monitor attached. I use openJDK
11.

I tried to follow question 127102 
(https://answers.launchpad.net/sikuli/+question/127102)
and using the script in comment #2.

the message result is like this:

java.awt.Rectangle[x=0,y=0,width=1920,height=1080]
[error] Screen(1) not in valid range 0 to 0 - using primary 0
java.awt.Rectangle[x=0,y=0,width=1920,height=1080]
-- hover test s0
L[100,100]@S(0)
left and laptop

-- hover test s1
L[100,100]@S(0)
left and laptop

-- capture test s0
black
-- capture test s1
black
-- selectRegion test s0
None
L[466,405]@S(0)
-- click test s0
L[966,545]@S(0)
-- click test s1
L[955,580]@S(0)

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #691383]: how to use OCR.readLines?

2020-06-18 Thread RaiMan
Question #691383 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691383

Status: Open => Answered

RaiMan proposed the following answer:
simply so:

reg = selectRegion()
lines = reg.textLines()
for line in list:
uprint(line)

uprint() instead of print is needed, because the read text might contain
non-ascii characters (unicode/utf-8).

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #691343]: Can i post xml file over http using sikulix.

2020-06-18 Thread RaiMan
Question #691343 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691343

Status: Open => Answered

RaiMan proposed the following answer:
Sorry - no example - you have to ask the net.

In my experience stackoverflow is the best place.

Another idea might be, to make a command script using curl, that you can
run using supprocess.Popen.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #691355]: Remote PC without Monitor: RobotDesktop: checkMousePosition

2020-06-18 Thread RaiMan
Question #691355 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691355

Status: Open => Answered

RaiMan proposed the following answer:
I am on Windows as well, but I do not have a NOC.
I mentioned my macMini, because this was the motivation for Intel to create the 
NOC line ;-)

To be clear: A machine (whatever system) that should run SikuliX
workflows using features like find(), click(), type() must have
something attached or emulated that is accepted by Java AWT as a screen
device (not-headless mode). On this screen the app under test must be
visible at runtime (no locked screen).

HDMI Dummy Plug: yes, this should solve it (emulates a screen with
FullHD resolution).

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Bug 1881240] Re: [2.0.4] findText() or find("some text") not working --- workaround

2020-06-18 Thread RaiMan
** Summary changed:

- findText() or find("some text") not working with Sikuli 2.0.4
+ [2.0.4] findText() or find("some text") not working --- workaround

** Description changed:

-  current state
+  current state / workaround
  findText() and find("some text") are supported by the same implementation, 
which currently does not work well.
  This is a bug and will be fixed in 2.0.5
  
  Until then try to solve your problem with findWord, findWords, findLine
  and findLines features
  
  **
  
  This is my code
  
  Settings.OcrTextRead = true;
  Settings.OcrTextSearch = true;
  
  Region RegionShapeMarkup = new Region(4,4,269,165);
  String TextBoxLabelName= "Shape";
  Match TextBoxLabelNameFound = 
RegionShapeMarkup.find(TextBoxLabelName);
  if (TextBoxLabelNameFound != null)
  {
  RegionShapeMarkup.click (TextBoxLabelNameFound.offset(0, -30));
  }
  
  the script fails with error
  FindFailed: Shape.png: (0x0) in R[4,4 269x165]@S(0)
  
  even though searching for text, script fails with error shape.png not
  found.
  
  Test environment:
  Windows 10 64bit, JAVA11
  
  Any help on this issue will be appreciated.

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1881240

Title:
  [2.0.4] findText() or find("some text") not working --- workaround

Status in Sikuli:
  In Progress

Bug description:
   current state / workaround
  findText() and find("some text") are supported by the same implementation, 
which currently does not work well.
  This is a bug and will be fixed in 2.0.5

  Until then try to solve your problem with findWord, findWords,
  findLine and findLines features

  **

  This is my code

  Settings.OcrTextRead = true;
  Settings.OcrTextSearch = true;

  Region RegionShapeMarkup = new Region(4,4,269,165);
  String TextBoxLabelName= "Shape";
  Match TextBoxLabelNameFound = 
RegionShapeMarkup.find(TextBoxLabelName);
  if (TextBoxLabelNameFound != null)
  {
  RegionShapeMarkup.click (TextBoxLabelNameFound.offset(0, -30));
  }

  the script fails with error
  FindFailed: Shape.png: (0x0) in R[4,4 269x165]@S(0)

  even though searching for text, script fails with error shape.png not
  found.

  Test environment:
  Windows 10 64bit, JAVA11

  Any help on this issue will be appreciated.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1881240/+subscriptions

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Bug 1882239] Re: sikulix 2.0 api - find text is not working

2020-06-18 Thread RaiMan
*** This bug is a duplicate of bug 1881240 ***
https://bugs.launchpad.net/bugs/1881240

This is the best result you can get with 2.0.4.

To read a light colored font on darker background (as in your example)
there will be an option in version 2.0.5 (you have to wait).

** This bug has been marked a duplicate of bug 1881240
   findText() or find("some text") not working with Sikuli 2.0.4

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1882239

Title:
  sikulix 2.0 api - find text is not working

Status in Sikuli:
  Invalid

Bug description:
  Hi,
  I am using windows 10  - 64 bit laptop.
  I am using sikulixapi2.0 jar. I am using findText method to find a text in 
present screen  using java program. Some times findText method working properly 
some times not working.
  Example: I typed one word in notepad and select that word using ctrl+a , so 
that word background color change into blue. In that scenario , findText is 
failed because of the background color changes.
  Whether i am didn't select a word using ctrl+a , the word is in normal 
background color. In that scenario, FindText method works fine without any 
error. I attached image for your reference.
  Not only above scenario, most of the cases findText is not working properly. 
What can I do for rectify this kind errors.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1882239/+subscriptions

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Bug 1882239] Re: sikulix 2.0 api - find text is not working

2020-06-18 Thread Hariharan SP
Now i am using sikuli 2.0.4 sikuli jar.
In sikuli version 2.0.4 also findtext is not working.
And I refered bug 1881240 , they mention use findword and findline methods. I 
also tried that method also, Some texts are not finded as expected.Some texts 
are with background color thats are not finded and move to exception part.

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1882239

Title:
  sikulix 2.0 api - find text is not working

Status in Sikuli:
  Invalid

Bug description:
  Hi,
  I am using windows 10  - 64 bit laptop.
  I am using sikulixapi2.0 jar. I am using findText method to find a text in 
present screen  using java program. Some times findText method working properly 
some times not working.
  Example: I typed one word in notepad and select that word using ctrl+a , so 
that word background color change into blue. In that scenario , findText is 
failed because of the background color changes.
  Whether i am didn't select a word using ctrl+a , the word is in normal 
background color. In that scenario, FindText method works fine without any 
error. I attached image for your reference.
  Not only above scenario, most of the cases findText is not working properly. 
What can I do for rectify this kind errors.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1882239/+subscriptions

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #691383]: how to use OCR.readLines?

2020-06-18 Thread matteoa
New question #691383 on Sikuli:
https://answers.launchpad.net/sikuli/+question/691383

hello, 
first of all, my config is:
2.0.4-2020-03-14_08:01/Windows10.0/Java8(64)1.8.0_251-b08

I have to do OCR on a table, it work rather well if I do it line by line.
I thought it could be faster to do it at once with OCR.readLines and psm = 6 so 
I tried to read the entire table in an image and then pass it to OCR.readLines.

This is my test code that uses manual screen region selection:
img=selectRegion()
imgFile=capture (img)
OCR.options.psm(6)
lstText=OCR.readLines(img)
print "lstLEN=" + str(len(lstText))
print "lst=" + str(lstText)
for i in range(len(lstText)):
print "mat="+str( lstText[i])
print "Txt="+OCR.readLine(lstText[i])
exit(0)

>From the output I see that there are 16 matches, that is correct, but then the
print "Txt="+OCR.readLine(lstText[i])
line gives an error:
error] script [ GM_DTC ] stopped with error in line 127
[error] java.lang.NullPointerException ( java.lang.NullPointerException )
[error] --- Traceback --- error source first
line: module ( function ) statement 
344: Utility (  getLineText ) strOcr = OCR.readLine(rReg, self.options)
127: main (   ) print "Txt="+OCR.readLine(lstText[i])
[error] --- Traceback --- end --

I suppose this is a stupid problem from my side, but once obtained the list of 
matches (as per the docs), how can I extract the strings in it?

Thanks for support

After having set the options (also smallfont)I print them and these are:
OCR.Options:
data = C:\Users\Myself\AppData\Roaming\Sikulix\SikulixTesseract\tessdata
language(eng) oem(3) psm(6) height(10,0) factor(3,00) dpi(96)
variables: user_defined_dpi:300



-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #691343]: Can i post xml file over http using sikulix.

2020-06-18 Thread Padam Jain
Question #691343 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691343

Status: Answered => Open

Padam Jain is still having a problem:
Getting bunch of errors while using httplib and urlilib.
it would be great help if you have any sample code for how to do it.

I simply want to connect, GET and POST on http server.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp