Open imperialguy opened 6 years ago
as already answered to your direct mail:
sorry, but I have nothing to do with Pyjnius ;-)
I guess the problem is, that something like Key.SHIFT is a static constant and does not have an accessor function.
So autoclass does not implement the access.
region.click() as you use it has this signature: click(String, Integer)
the shift-modifier according to the Java docs is an int 1.
so try: click(image, 1)
To verify the values in the SikuliX IDE simply use print KeyModifier.SHIFT
But you might as well use one of the more sophisticated reflection features of Pyjnius.
Hope it helps.
Versions: sikulix 1.1.1 and 1.1.2 (from nightly builds) OS: Windows 7
If I type the following command in SikuliX IDE, it works perfectly fine:
click('sample.png', KEY_SHIFT)
It clicks on the target while holding the SHIFT key simultaneously.
If I do the same thing in python through
jnius
, the normal click works, but click with key modifiers doesn't work. None of the following three ways of using key modifiers works.They all throw the same error message:
JavaException: No methods matching your arguments
Of course, this works perfectly fine without the key modifiers. Please help.