Re: [Sikuli-driver] [Question #139475]: Sikuli X 1.0rc1 - How to get an exact match with click("String")?

2019-08-19 Thread Sam Say
Question #139475 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/139475

Sam Say posted a new comment:
I'm still having issues with text recognition using java. 
example: sikulix reads 07/01/2019 as |//||'|/') can you please advise?

Region match = allScreens.findText("Sometext");
allScreens.click(match);
String textRight = match.right(100).text();

it is finding sometext but not reading the text to its right correctly.

-- 
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 #682255]: Custom theading best practices

2019-08-19 Thread RaiMan
Question #682255 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/682255

RaiMan proposed the following answer:
no problem. Everything is worth to be evaluated and might lead to
enhancements ;-)

-- 
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 #682255]: Custom theading best practices

2019-08-19 Thread Hugo Jose Goncalves
Question #682255 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/682255

Hugo Jose Goncalves posted a new comment:
Oh, I don't need at all
I may have misread python docs about threading
Long time I don't use it at all.

Gonna test it tonight, sorry for bothering.

-- 
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 #682255]: Custom theading best practices

2019-08-19 Thread RaiMan
Question #682255 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/682255

RaiMan proposed the following answer:
I tested and found the problem is:
taskThread.daemon = True

This seems to completely detach the thread from the running script's context to 
the global context of the IDE.
Everything works fine, if you leave this out.

Why do you think you need it in your 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


[Sikuli-driver] [Bug 1840689] [NEW] [1.1.4] macOS: Java 9+: multi-monitor with 1st Retina and 2nd non-Retina does not work --- workaround: use Java 8

2019-08-19 Thread RaiMan
Public bug reported:

I have a retina macbook plugged into an external monitor. A normal
screenshot from both monitors produces images like this:

Primary:
https://imgur.com/J4C7Fcl

External:
https://imgur.com/w7q19Xl

When I use SikuliIDE's "Take screenshot" functionality, it seems to
resize everything in an odd way:

Primary:
https://imgur.com/1ZzqMXT

External:
https://imgur.com/sygNmDc

When running the capture tool, it seems that Sikuli is changing the
resolution of my external monitor (possibly halving it?). Is this
something that's happening to deal with retina display? Dividing the
resolution by 2?

Currently, it's impossible to take a screenshot on the external monitor.
I'm also having problems with Sikuli finding anything on the external
monitor.

Does Sikuli support a setup that includes a primary retina display with
an external non-retina display?

** Affects: sikuli
 Importance: Medium
 Assignee: RaiMan (raimund-hocke)
 Status: In Progress

** Changed in: sikuli
   Status: New => In Progress

** Changed in: sikuli
   Importance: Undecided => Medium

** Changed in: sikuli
 Assignee: (unassigned) => RaiMan (raimund-hocke)

** Changed in: sikuli
Milestone: None => 1.1.4

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

Title:
  [1.1.4] macOS: Java 9+: multi-monitor with 1st Retina and 2nd non-
  Retina does not work --- workaround: use Java 8

Status in Sikuli:
  In Progress

Bug description:
  I have a retina macbook plugged into an external monitor. A normal
  screenshot from both monitors produces images like this:

  Primary:
  https://imgur.com/J4C7Fcl

  External:
  https://imgur.com/w7q19Xl

  When I use SikuliIDE's "Take screenshot" functionality, it seems to
  resize everything in an odd way:

  Primary:
  https://imgur.com/1ZzqMXT

  External:
  https://imgur.com/sygNmDc

  When running the capture tool, it seems that Sikuli is changing the
  resolution of my external monitor (possibly halving it?). Is this
  something that's happening to deal with retina display? Dividing the
  resolution by 2?

  Currently, it's impossible to take a screenshot on the external
  monitor. I'm also having problems with Sikuli finding anything on the
  external monitor.

  Does Sikuli support a setup that includes a primary retina display
  with an external non-retina display?

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1840689/+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


Re: [Sikuli-driver] [Question #682295]: [1.1.4] macOS 10.14.5 - Taking a screenshot with SikuliIDE on an external monitor with a Retina primary display

2019-08-19 Thread RaiMan
Question #682295 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/682295

RaiMan proposed the following answer:
I made it a bug.

-- 
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 #682295]: [1.1.4] macOS 10.14.5 - Taking a screenshot with SikuliIDE on an external monitor with a Retina primary display

2019-08-19 Thread RaiMan
Question #682295 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/682295

Linked to bug: #1840689
https://bugs.launchpad.net/bugs/1840689
"[1.1.4] macOS: Java 9+: multi-monitor with 1st Retina and 2nd non-Retina 
does not work --- workaround: use Java 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 #682295]: [1.1.4] macOS 10.14.5 - Taking a screenshot with SikuliIDE on an external monitor with a Retina primary display

2019-08-19 Thread RaiMan
Question #682295 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/682295

RaiMan proposed the following answer:
Thanks for reporting.

Confirmed if running with Java 12 (supposing 9, 10, 11 also, but not
tested).

When using Java 8, it works as expected.

Not sure, how fast this can be fixed.

-- 
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] [Question #682295]: Status of bug #1840689 changed to 'In Progress' in Sikuli

2019-08-19 Thread RaiMan
Bug #1840689 status changed in Sikuli:

New => In Progress

https://bugs.launchpad.net/sikuli/+bug/1840689
"[1.1.4] macOS: Java 9+: multi-monitor with 1st Retina and 2nd non-Retina does 
not work --- workaround: use Java 8"

This bug is linked to #682295.
[1.1.4] macOS 10.14.5 - Taking a screenshot with SikuliIDE on an external 
monitor with a Retina primary display
https://answers.launchpad.net/sikuli/+question/682295

-- 
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 1835908] Re: [1.1.4] Class com.sun.jna.Native not found --- fixed build #321

2019-08-19 Thread RaiMan
@Vijay

I guess your jna-removal was not successful.

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

Title:
  [1.1.4] Class com.sun.jna.Native not found --- fixed build #321

Status in Sikuli:
  Fix Committed

Bug description:
  Exception in thread "Thread-145" Exception in thread "Thread-133" 
java.lang.NoClassDefFoundError: Could not initialize class 
org.sikuli.script.Finder$FindInput2
at org.sikuli.script.Finder.(Finder.java:36)
at 
OlegServer.Tests.MurderInAlpsTests.lambda$existingObjects$1(MurderInAlpsTests.java:2392)
at java.base/java.lang.Thread.run(Thread.java:835)
  java.lang.NoSuchMethodError: 
com.sun.jna.Native.load(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Map;)Lcom/sun/jna/Library;
at org.sikuli.natives.SXUser32.(SXUser32.java:9)
at org.sikuli.natives.WinUtil.(WinUtil.java:37)
at 
org.sikuli.script.support.RunTime.addToWindowsSystemPath(RunTime.java:1631)
at org.sikuli.script.support.RunTime.libsExport(RunTime.java:1574)
at org.sikuli.script.support.RunTime.libsLoad(RunTime.java:1399)
at org.sikuli.script.support.RunTime.loadLibrary(RunTime.java:1603)
at org.sikuli.script.Finder$Finder2.(Finder.java:571)
at org.sikuli.script.Finder$FindInput2.(Finder.java:1210)
at org.sikuli.script.Finder.(Finder.java:36)
at 
OlegServer.Tests.MurderInAlpsTests.lambda$existingObjects$1(MurderInAlpsTests.java:2392)
at java.base/java.lang.Thread.run(Thread.java:835)

  
  i am getting these exception when running:
Finder objFinder = new Finder(BufferedImage);
  This code worked fine on sikuli 1.1.4 and then stopped working after updating 
to latest 1.1.4 build

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1835908/+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 1840077] Re: [1.1.4] API: Crash when running under OpenJ9 JVM on Windows

2019-08-19 Thread RaiMan
** Changed in: sikuli
   Importance: High => Critical

** Summary changed:

- [1.1.4] API: Crash when running under OpenJ9 JVM on Windows
+ [1.1.4] API: Crash when running under OpenJ9 JVM on Windows --- fixed 
2019-08-19 build #365

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

Title:
  [1.1.4] API: Crash when running under OpenJ9 JVM on Windows --- fixed
  2019-08-19 build #365

Status in Sikuli:
  Fix Committed

Bug description:
  SikuliX API crashes on Windows when running under OpenJ9 JVM (formerly IBM 
J9).
  The crash happens when the JVM loads the Finder class.

  I'm using SikuliX1 API version 1.1.4, latest build.

  This is a simple test program to reproduce the crash:

  public class SikuliBug {
   public static void main(String[] args) {
    new org.sikuli.script.Pattern("blah");
   }
  }

  Exception in thread "main" java.lang.ExceptionInInitializerError
  at java.lang.J9VMInternals.ensureError(J9VMInternals.java:148)
  at 
java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:137)
  at org.sikuli.script.Pattern.(Pattern.java:123)
  at SikuliBug.main(SikuliBug.java:3)
  Caused by: java.lang.IllegalArgumentException: Last character in replacement 
string can't be \, character to be escaped is required.
  at java.lang.String.checkLastChar(String.java:62)
  at java.lang.String.replaceAll(String.java:3530)
  at 
org.sikuli.script.support.RunTime.addToWindowsSystemPath(RunTime.java:1722)
  at org.sikuli.script.support.RunTime.libsExport(RunTime.java:1661)
  at org.sikuli.script.support.RunTime.libsLoad(RunTime.java:1486)
  at org.sikuli.script.support.RunTime.loadLibrary(RunTime.java:1690)
  at org.sikuli.script.Finder$Finder2.(Finder.java:571)
  ... 2 more

  The problem happens on this line in addToWindowsSystemPath():

   String libsPath = (fLibsFolder.getAbsolutePath()).replaceAll("/",
  "\\");

  Proposed fix:

  Use replace() instead of replaceAll()

   String libsPath = (fLibsFolder.getAbsolutePath()).replace("/", "\\");

  This is more appropriate anyway, since you just want to replace all
  occurences of a fixed string or a character.

  By the way, try to run this line with the JVM of your choice (you
  might be surprised):

  "C:/bang/bang".replaceAll("/", "\\")

  I get this with Oracle JVM:

  Exception in thread "main" java.lang.IllegalArgumentException: character to 
be escaped is missing
  at java.util.regex.Matcher.appendReplacement(Matcher.java:809)
  at java.util.regex.Matcher.replaceAll(Matcher.java:955)
  at java.lang.String.replaceAll(String.java:2223)
  at J9StringReplaceAllBug.main(SikuliBug.java:4)

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1840077/+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


Re: [Sikuli-driver] [Question #682863]: [1.1.4] ./ no longer working to run multiple scripts from command line --- fixed 2019-08-19 build #365

2019-08-19 Thread RaiMan
Question #682863 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/682863

Status: Answered => Solved

RaiMan changed the question status:
fixed

-- 
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 #682863]: [1.1.4] ./ no longer working to run multiple scripts from command line --- fixed 2019-08-19 build #365

2019-08-19 Thread RaiMan
Question #682863 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/682863

Summary changed to:
[1.1.4] ./ no longer working to run multiple scripts from command line --- 
fixed 2019-08-19 build #365

-- 
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 1835908] Re: [1.1.4] Class com.sun.jna.Native not found --- fixed build #321

2019-08-19 Thread Vijay
Hi RaiMan, 
I recently migrated to sikuli 1.1.4 and i'm automating an applet in my project. 
I'm receiving a similar error mentioned by Valerij. below is the error


java.lang.NoSuchMethodError: 
com.sun.jna.Native.load(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Map;)Lcom/sun/jna/Library;
at org.sikuli.natives.SXUser32.(SXUser32.java:13)
at 
org.sikuli.script.support.KeyboardLayout.getCurrentLayout(KeyboardLayout.java:591)
at 
org.sikuli.script.support.KeyboardLayout.toJavaKeyCode(KeyboardLayout.java:613)
at org.sikuli.script.Key.toJavaKeyCode(Key.java:516)
at org.sikuli.script.Key.(Key.java:401)
at org.sikuli.script.Region.type(Region.java:4658)
at 
com.org.PageObjects.UCaaS.BCRMSiteLocationnContacts.SearchLocationSikuli(BCRMSiteLocationnContacts.java:133)
at com.org.ExecutableTests.UCaaS.UCaaSTest.UCaaSAdd(UCaaSTest.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at 
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at 
org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)

**

I removed the jna and jna-platform as suggested by you but yet am facing
the same error.

The error comes at the "type" method of "Screen" class.

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

Title:
  [1.1.4] Class com.sun.jna.Native not found --- fixed build #321

Status in Sikuli:
  Fix Committed

Bug description:
  Exception in thread "Thread-145" Exception in thread "Thread-133" 
java.lang.NoClassDefFoundError: Could not initialize class 
org.sikuli.script.Finder$FindInput2
at org.sikuli.script.Finder.(Finder.java:36)
at 
OlegServer.Tests.MurderInAlpsTests.lambda$existingObjects$1(MurderInAlpsTests.java:2392)
at java.base/java.lang.Thread.run(Thread.java:835)
  java.lang.NoSuchMethodError: 
com.sun.jna.Native.load(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Map;)Lcom/sun/jna/Library;
at org.sikuli.natives.SXUser32.(SXUser32.java:9)
at org.sikuli.natives.WinUtil.(WinUtil.java:37)
at 
org.sikuli.script.support.RunTime.addToWindowsSystemPath(RunTime.java:1631)
at org.sikuli.script.support.RunTime.libsExport(RunTime.java:1574)
at org.sikuli.script.support.RunTime.libsLoad(RunTime.java:1399)
at org.sikuli.script.support.RunTime.loadLibrary(RunTime.java:1603)
at org.sikuli.script.Finder$Finder2.(Finder.java:571)
at org.sikuli.script.Finder$FindInput2.(Finder.java:1210)
at org.sikuli.script.Finder.(Finder.java:36)
at 
OlegServer.Tests.MurderInAlpsTests.lambda$existingObjects$1(MurderInAlpsTests.java:2392)
at java.base/java.lang.Thread.run(Thread.java:835)

  
  i am getting these exception when running:
Finder objFinder = new Finder(BufferedImage);
  This code worked fine on sikuli 1.1.4 and then stopped working after updating 
to latest 1.1.4 build

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

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

Re: [Sikuli-driver] [Question #683031]: How do I use it for drag and drop both as offset relative and also absolute positioning.

2019-08-19 Thread RaiMan
Question #683031 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/683031

Status: Open => Answered

RaiMan proposed the following answer:
--- absolute
- use the button in IDE to create a Location

--- relative
- use someLocation.offset(x, y)

or in IDE create an Offset with the button and use it as
someLocation.offset(generatedOffset)

-- 
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] [Question #683031]: How do I use it for drag and drop both as offset relative and also absolute positioning.

2019-08-19 Thread Udhay Kumar
New question #683031 on Sikuli:
https://answers.launchpad.net/sikuli/+question/683031

How do I use it for drag and drop both as offset relative and also absolute 
positioning.

-- 
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 #682911]: Why do sikuli and runnable jar created from sikuli fetch different directory?

2019-08-19 Thread RaiMan
Question #682911 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/682911

Status: Open => Answered

RaiMan proposed the following answer:
just use

java -jar \sikulix.jar -r \someScript.sikuli

from a commandline.

pack this into a run.cmd and use it as you need.

-- 
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