Re: [Sikuli-driver] [Question #696946]: Right click + Shift

2021-05-07 Thread masuo
Question #696946 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/696946

Status: Open => Answered

masuo proposed the following answer:
keyDown(Key.SHIFT)
rightClick("image.png")
keyUp(Key.SHIFT)

https://sikulix-2014.readthedocs.io/en/latest/region.html?highlight=KeyDown#Region.keyDown

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

___
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 #696960]: region text not working properly or may be some bug

2021-05-07 Thread BIPIN
New question #696960 on SikuliX:
https://answers.launchpad.net/sikuli/+question/696960

hello guys,
let me show first code then issue.


s = Screen();
r = Region();
num = 2.00;
s.wait(num);
p = s.find("RecordLbl.png");
bounds = s.getBounds();
ocr_x = 0; ocr_y = 0; ocr_w = 0; ocr_h = 0;
ocr_x = p.x + p.w + 350;
ocr_y = p.y + 0;
ocr_w = bounds.width - ocr_x -20;
ocr_h = p.h + 0;
rect = Rectange(
counter = 1
for x in range(0, 3):
while True:
for z in range(0, 10):
reg_text = r.create(ocr_x,ocr_y,ocr_w,ocr_h);
text1 = reg_text.text();
print(" printing text " +text1);
if text1 == "":
break;
counter +=1;
if counter >5:
break;


In my scenario there is a loader icon that moves horizontally in a defined 
region, to detect loader we use region.text() function. it returns some values 
when there is the loader or else it returns the empty string "".
In this region.text() function, we use the loop to detect loader, as soon as it 
finds loader it returns a value, but the problem occurs when the loading screen 
disappears but still region.text() function returns a value instead of an empty 
string, it looks like bot can still see loader in the region.
it looks like there is a problem with the region or text function cache.
moreover ,if there is no loader in the region, region.text() function return 
empty string "" .

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

___
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 1927536] Re: Screenshot function / Windows Resolution Scaling

2021-05-07 Thread Jeremy Bost
I have determined you can get the adjustment value by running a shell
command of:

wmic DESKTOPMONITOR get PixelsPerXLogicalInch

or

wmic DESKTOPMONITOR get PixelsPerYLogicalInch

The X & Y should be identical for general scaling.

The number indicated tells what scaling value is being used.

96  - 100%
120 - 125%
144 - 150%
192 - 200%
240 - 250%
288 - 300%
384 - 400%
480 - 500%

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

Title:
  Screenshot function / Windows Resolution Scaling

Status in SikuliX:
  New

Bug description:
  I've seen a bunch of incorrect isolation concerning this issue.  I've
  seen posts where the screenshot function shows a different resolution
  than expected.  I've seen posts where people note they're using a 4k
  display, which also isn't a factor to this issue and some that report
  it without a clue as to any of the causes.

  Basically, the issue is that the screenshot function uses a straight
  value for resolution in the Sikuli IDE.  Windows has a scaling
  function that actually adjusts the displayed resolution based upon the
  scaling value selected.  This means that the screenshot function's
  resolution value is always going to display the wrong area for the
  display when scaling is involved.

  Here are some screenshots of how the screenshot function functions at
  different scaling:

  https://ibb.co/drQLGhr - 125%
  https://ibb.co/xshHg2C - 150%
  https://ibb.co/7C06Ny4 - 175%

  I guess my question is, would someone change the way the screenshot
  function gets it's value for resolution?  Like, have it get the
  resolution value and the scaling value and calculate a final value for
  it to use?

  This issue can be reproduced on any PC with Windows.  You simply
  change your display resolution scaling and trigger the screenshot
  function.  If it's difficult to find the location of where this
  setting is in windows, you can hit Win+R and type in:  control
  desk.cpl  and hit enter to bring up the right location or right click
  on the wallpaper area and pick display settings.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1927536/+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 1927536] [NEW] Screenshot function / Windows Resolution Scaling

2021-05-07 Thread Jeremy Bost
Public bug reported:

I've seen a bunch of incorrect isolation concerning this issue.  I've
seen posts where the screenshot function shows a different resolution
than expected.  I've seen posts where people note they're using a 4k
display, which also isn't a factor to this issue and some that report it
without a clue as to any of the causes.

Basically, the issue is that the screenshot function uses a straight
value for resolution in the Sikuli IDE.  Windows has a scaling function
that actually adjusts the displayed resolution based upon the scaling
value selected.  This means that the screenshot function's resolution
value is always going to display the wrong area for the display when
scaling is involved.

Here are some screenshots of how the screenshot function functions at
different scaling:

https://ibb.co/drQLGhr - 125%
https://ibb.co/xshHg2C - 150%
https://ibb.co/7C06Ny4 - 175%

I guess my question is, would someone change the way the screenshot
function gets it's value for resolution?  Like, have it get the
resolution value and the scaling value and calculate a final value for
it to use?

This issue can be reproduced on any PC with Windows.  You simply change
your display resolution scaling and trigger the screenshot function.  If
it's difficult to find the location of where this setting is in windows,
you can hit Win+R and type in:  control desk.cpl  and hit enter to bring
up the right location or right click on the wallpaper area and pick
display settings.

** Affects: sikuli
 Importance: Undecided
 Status: New

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

Title:
  Screenshot function / Windows Resolution Scaling

Status in SikuliX:
  New

Bug description:
  I've seen a bunch of incorrect isolation concerning this issue.  I've
  seen posts where the screenshot function shows a different resolution
  than expected.  I've seen posts where people note they're using a 4k
  display, which also isn't a factor to this issue and some that report
  it without a clue as to any of the causes.

  Basically, the issue is that the screenshot function uses a straight
  value for resolution in the Sikuli IDE.  Windows has a scaling
  function that actually adjusts the displayed resolution based upon the
  scaling value selected.  This means that the screenshot function's
  resolution value is always going to display the wrong area for the
  display when scaling is involved.

  Here are some screenshots of how the screenshot function functions at
  different scaling:

  https://ibb.co/drQLGhr - 125%
  https://ibb.co/xshHg2C - 150%
  https://ibb.co/7C06Ny4 - 175%

  I guess my question is, would someone change the way the screenshot
  function gets it's value for resolution?  Like, have it get the
  resolution value and the scaling value and calculate a final value for
  it to use?

  This issue can be reproduced on any PC with Windows.  You simply
  change your display resolution scaling and trigger the screenshot
  function.  If it's difficult to find the location of where this
  setting is in windows, you can hit Win+R and type in:  control
  desk.cpl  and hit enter to bring up the right location or right click
  on the wallpaper area and pick display settings.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1927536/+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 #696951]: unable to find a text in some screens

2021-05-07 Thread Karthika Natarajan
New question #696951 on SikuliX:
https://answers.launchpad.net/sikuli/+question/696951

Hi, I have been trying to find a text on screen using sikuli findText,waitText 
method but the text is not found, it throw findfailed exception on that 
particular screen, even though the word is available on the screen
FYI: I'm using latest sikuli api jar version 2.0.5


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

___
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 #696946]: Right click + Shift

2021-05-07 Thread Manfred Hampl
Question #696946 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/696946

Manfred Hampl posted a new comment:
or

rightClick("image.png", KEY_SHIFT)

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

___
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 #696946]: Right click + Shift

2021-05-07 Thread DH
Question #696946 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/696946

Status: Answered => Solved

DH confirmed that the question is solved:
Thanks, Now I understand how I can combine.
:-)

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

___
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 #696946]: Right click + Shift

2021-05-07 Thread DH
Question #696946 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/696946

Status: Answered => Open

DH is still having a problem:
Hmm I don't understand.

I can't figure out how to combine

myEdge = find("edgeIcon.png")
rightClick(myEdge)

That works just fine.

But I need to right click + Key.SHIFT

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

___
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 #696946]: Right click + Shift

2021-05-07 Thread DH
New question #696946 on SikuliX:
https://answers.launchpad.net/sikuli/+question/696946

Hi,
how can I combine right click + Shift?

I can trigger right click.

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

___
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 #696946]: Right click + Shift

2021-05-07 Thread Manfred Hampl
Question #696946 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/696946

Status: Open => Answered

Manfred Hampl proposed the following answer:
From
https://sikulix-2014.readthedocs.io/en/latest/region.html#Region.rightClick

rightClick(PSMRL[, modifiers])
Perform a mouse click on the click point using the right button.

Parameters: 
   PSMRL – a pattern, a string, a match, a region or a location that evaluates 
to a click point.
   modifiers – one or more key modifiers
Returns:
   the number of performed right clicks (actually 1). A 0 (integer null) means 
that because of some reason, no click could be performed (in case of PS may be 
not Found).

Side Effect if PS was used, the match can be accessed using
Region.getLastMatch() afterwards.

Use KEY_SHIFT as value for "modifiers", see also
https://sikulix-2014.readthedocs.io/en/latest/keys.html

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

___
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