[Sikuli-driver] [Question #688897]: Why Handler is not working in region.onAppear.?

2020-02-20 Thread Leonardo Castro
New question #688897 on Sikuli:
https://answers.launchpad.net/sikuli/+question/688897

Hello.

When I run my code, nothing happens, no erros, but also no results.
I already checked "comparing" values of image, and image is aways being 
detected, but handler does not run.

What I'm doing wrong?

CODE:

def Quests(event = None):
if not event:
r.stopObserver()
doubleClick("1581564293714.png")
while exists(Pattern("1581657244124.png").similar(0.85)):
click(Pattern("1581657244124-1.png").similar(0.84))
sleep(0.5)
if exists("1582077186091.png"):
click ("1582077186091.png")
sleep(0.5)
click("1582077240628.png")
else:
if exists("1582257077497.png"):
sleep(0.5)
click(Pattern("1582257077497.png").similar(0.62))
sleep(0.5)
else:
click("1582257086061.png")
sleep(1)
while exists(Pattern("1581657244124.png").similar(0.83)):
click(Pattern("1581657244124-1.png").similar(0.84))
sleep(0.5)

while (1):
r.onAppear("1581564293714.png", Quests)
r.observeInBackground(); wait(10)
r.stopObserver()

-- 
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 #688887]: Click() Implementation in Code

2020-02-20 Thread jeff
Question #67 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/67

Status: Answered => Open

jeff is still having a problem:
Thank you! I'm starting to get oriented.


I'm interpreting "loc" in this line to mean  the coordinates are passed in(?).

 protected static int click(Location loc, int buttons, Integer modifiers, 
boolean dblClick, Object owner) {
https://github.com/RaiMan/SikuliX1/blob/863393f3c57efdad8f723a7cd3029947ddc2364b/API/src/main/java/org/sikuli/script/Mouse.java#L250

Are the locations recognized via OpenCV? Where is that call?


I'm working to understand the sensitivity of Display geometries on recognition.

-- 
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 #688872]: Get build number of .exe file

2020-02-20 Thread RaiMan
Question #688872 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688872

RaiMan proposed the following answer:
clapping hands ;-)

I would not have it done better.

... you might even put the wanted exe-filename as a parameter to the Popen, 
when saying:
("python", "path_to_GetSetupBuildNumber.py", "wanted-filename"), ...

and in the GetSetupBuildNumber.py get the filename from sys.argv[1]

-- 
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 #688872]: Get build number of .exe file

2020-02-20 Thread Asheru
Question #688872 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688872

Asheru posted a new comment:
 **theproc = subprocess.Popen(path_to_GetSetupBuildNumber.py, shell =
True,stdout=subprocess.PIPE, stderr=subprocess.STDOUT)

-- 
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 #688872]: Get build number of .exe file

2020-02-20 Thread Asheru
Question #688872 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688872

Asheru posted a new comment:
I found a solution for this. Not the best but simple and quick (works
for me).

So I have a script named "GetSetupBuildNumber.py", that uses win32
package wich normally would not work executed from a sikuli script for
printing the build number. Here is the code:


--from win32api import GetFileVersionInfo, LOWORD, HIWORD

def get_version_number (filename):
  info = GetFileVersionInfo (filename, "\\")
  ms = info['FileVersionMS']
  ls = info['FileVersionLS']
  return HIWORD (ms), LOWORD (ms), HIWORD (ls), LOWORD (ls)

if __name__ == '__main__':
  import os
  filename = os.environ["COMSPEC"]
  print (".".join ([str (i) for i in get_version_number (path_to_file)]))--


Then inside the sikuli script I have a function that looks like this:

--def get_build_number_from_exe_file():
theproc = subprocess.Popen(path_to_file, shell = 
True,stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
tmp = theproc.stdout.read()
theproc.communicate() 
print tmp --


So what It does, it executes a python script that prints the build number in 
the console. Then it is read from the console and stored in 'tmp' variable.

-- 
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 1863949] Re: [2.0.2] VNC: capture() returns ScreenImage instead of filename

2020-02-20 Thread RaiMan
ok, thanks for feedback.

yes this is a historical oddity with the scripting and Java API:

SCREEN.capture() uses a Python implementation, that is bound to the
SCREEN object (a quasi constant for Screen(0)). Simply using capture()
would yield the same, since all Region/Screen functions are bound to
SCREEN when used undotted.

When you use Screen(x).capture() you use the function at the Java API
level in class Screen, which always returns a ScreenImage (with which
you can use getFile()).

This will to some extent be revised in 2.1.0, where the features for all
Objects with pixel content (Screen, Region, Match, Image, ScreenImage,
...) will be consolidated.

... but there is always the need for being as backwards compatible as
possible or needed.

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

Title:
  [2.0.2] VNC: capture() returns ScreenImage instead of filename

Status in Sikuli:
  In Progress

Bug description:
  In 2.0.2, on 64 bit Arch Linux, depending on how capture is called it
  is no longer returning a file path. I cannot find anywhere where this
  behavior is documented and therefore am reporting it as a bug. It
  seems to be returning a java object and making a java call.

  imagePath = SCREEN.capture()
  print imagePath
  imagePath = VNC.capture()
  print imagePath
  imagePath = capture(VNC) #FYI - local screen captured
  print imagePath
  exit(0)

  Actual:
  CConnection: Server supports RFB protocol version 3.8
  CConnection: Using RFB protocol version 3.8
  org.sikuli.script.ScreenImage@59ab5f32
  org.sikuli.script.ScreenImage@4236bae8
  [info] Exit code: 0
  /tmp/Sikulix_1686686143/sikuliximage-1582144646621.png

  Expected:
  shutil.move(vnc.capture(), FULL_PATH) #from tmp

  Work around:
  img = vnc.capture().saveInBundle("temp")
  shutil.move(img, FULL_PATH) #from bundle

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1863949/+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 1863949] Re: [2.0.2] VNC: capture() returns ScreenImage instead of filename

2020-02-20 Thread Glenn Tanner
found related, 315005, thanks to getFile command. I suppose you can close, 
please document this.
https://sikulix-2014.readthedocs.io/en/latest/screen.html#Screen.capture

>From documentation:
Capturing is the feature, to grab a rectangle of pixels from a screenshot and 
save it to a file for later use. Each time, a capturing is done, a new 
screenshot is taken (Screen.capture()).
.
…on Java usage or in non-Python

String filename = screen.saveCapture(Object... args)
String filename = region.saveCapture(Object... args)
… where screen/region are some existing Screen/Region objects.

The args are according to the above parameter specifications of the two
Screen.capture() variants.

screen.saveCapture() is a shortcut for String filename =
screen.cmdCapture(Object... args).getStoredAt()

The intermediate result of cmdCapture is a ScreenImage object, that
holds the image internally as BufferedImage (accessible using
ScreenImage.get()).


CODE:
imagePath = Screen(0).capture().getFile()
print imagePath
imagePath = Screen(1).capture().getStoredAt()
print imagePath
imagePath = Screen(2).capture().get()
print imagePath

OUTPUT:
/tmp/Sikulix_1729683/sikuliximage-1582206170280.png
None
[error] AttributeError ( 'org.sikuli.script.ScreenImage' object has no 
attribute 'get' )
[error] --- Traceback --- error source first
line: module ( function ) statement 
61: main (   ) imagePath = Screen(2).capture().get()

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

Title:
  [2.0.2] VNC: capture() returns ScreenImage instead of filename

Status in Sikuli:
  In Progress

Bug description:
  In 2.0.2, on 64 bit Arch Linux, depending on how capture is called it
  is no longer returning a file path. I cannot find anywhere where this
  behavior is documented and therefore am reporting it as a bug. It
  seems to be returning a java object and making a java call.

  imagePath = SCREEN.capture()
  print imagePath
  imagePath = VNC.capture()
  print imagePath
  imagePath = capture(VNC) #FYI - local screen captured
  print imagePath
  exit(0)

  Actual:
  CConnection: Server supports RFB protocol version 3.8
  CConnection: Using RFB protocol version 3.8
  org.sikuli.script.ScreenImage@59ab5f32
  org.sikuli.script.ScreenImage@4236bae8
  [info] Exit code: 0
  /tmp/Sikulix_1686686143/sikuliximage-1582144646621.png

  Expected:
  shutil.move(vnc.capture(), FULL_PATH) #from tmp

  Work around:
  img = vnc.capture().saveInBundle("temp")
  shutil.move(img, FULL_PATH) #from bundle

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1863949/+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 1863949] Re: [2.0.2] VNC: capture() returns ScreenImage instead of filename

2020-02-20 Thread Glenn Tanner
Hi RaiMan,

Thanks for the getFile command. I wanted to point out this is not
limited to VNC, I was not clear before. W/O vnc (I have 3 monitors):

imagePath = Screen(0).capture()
print imagePath
imagePath = Screen(1).capture()
print imagePath
imagePath = Screen(2).capture()
print imagePath
exit(0)

org.sikuli.script.ScreenImage@7a37cc0f
org.sikuli.script.ScreenImage@cb98950
[info] Exit code: 0
org.sikuli.script.ScreenImage@b63dea

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

Title:
  [2.0.2] VNC: capture() returns ScreenImage instead of filename

Status in Sikuli:
  In Progress

Bug description:
  In 2.0.2, on 64 bit Arch Linux, depending on how capture is called it
  is no longer returning a file path. I cannot find anywhere where this
  behavior is documented and therefore am reporting it as a bug. It
  seems to be returning a java object and making a java call.

  imagePath = SCREEN.capture()
  print imagePath
  imagePath = VNC.capture()
  print imagePath
  imagePath = capture(VNC) #FYI - local screen captured
  print imagePath
  exit(0)

  Actual:
  CConnection: Server supports RFB protocol version 3.8
  CConnection: Using RFB protocol version 3.8
  org.sikuli.script.ScreenImage@59ab5f32
  org.sikuli.script.ScreenImage@4236bae8
  [info] Exit code: 0
  /tmp/Sikulix_1686686143/sikuliximage-1582144646621.png

  Expected:
  shutil.move(vnc.capture(), FULL_PATH) #from tmp

  Work around:
  img = vnc.capture().saveInBundle("temp")
  shutil.move(img, FULL_PATH) #from bundle

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1863949/+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 #688886]: Defnition calling another Definition already declared.

2020-02-20 Thread Leonardo Castro
Question #66 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/66

Status: Answered => Solved

Leonardo Castro confirmed that the question is solved:
Thank you Raiman!

-- 
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 #688872]: Get build number of .exe file

2020-02-20 Thread RaiMan
Question #688872 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688872

RaiMan proposed the following answer:
since "get the build number of an .exe file" is not part of my daily
business ;-) I am sorry to leave you alone with that :-(

-- 
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 #688883]: onAppear handler will be called again

2020-02-20 Thread RaiMan
Question #63 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/63

RaiMan proposed the following answer:
everything available is in the docs:
https://sikulix-2014.readthedocs.io/en/latest/region.html#observing-visual-events-in-a-region

-- 
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 1863949] Re: [2.0.2] VNC: capture() returns ScreenImage instead of filename

2020-02-20 Thread RaiMan
Sorry for the inconvenience, but VNC is not well documented and not my
priority in the moment.

You have to live with your workaround.

I would suggest to isolate your VNC.capture() into a global function, so
you can easily adapt when changes are coming with 2.1.0.

looks a bit odd, but this is a oneliner:

imagePath = VNC.capture().getFile(FULL_PATH, "temp")

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

Title:
  [2.0.2] VNC: capture() returns ScreenImage instead of filename

Status in Sikuli:
  In Progress

Bug description:
  In 2.0.2, on 64 bit Arch Linux, depending on how capture is called it
  is no longer returning a file path. I cannot find anywhere where this
  behavior is documented and therefore am reporting it as a bug. It
  seems to be returning a java object and making a java call.

  imagePath = SCREEN.capture()
  print imagePath
  imagePath = VNC.capture()
  print imagePath
  imagePath = capture(VNC) #FYI - local screen captured
  print imagePath
  exit(0)

  Actual:
  CConnection: Server supports RFB protocol version 3.8
  CConnection: Using RFB protocol version 3.8
  org.sikuli.script.ScreenImage@59ab5f32
  org.sikuli.script.ScreenImage@4236bae8
  [info] Exit code: 0
  /tmp/Sikulix_1686686143/sikuliximage-1582144646621.png

  Expected:
  shutil.move(vnc.capture(), FULL_PATH) #from tmp

  Work around:
  img = vnc.capture().saveInBundle("temp")
  shutil.move(img, FULL_PATH) #from bundle

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1863949/+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 #688872]: Get build number of .exe file

2020-02-20 Thread Asheru
Question #688872 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688872

Asheru posted a new comment:
@Manfred Hampl
Hmm, i wanted to avoid the use of images for this.


@RaiMan
Ok then, it seems I have to to some research.

-- 
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 #688883]: onAppear handler will be called again

2020-02-20 Thread larryli
Question #63 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/63

larryli posted a new comment:
is there any API or method to control remove onAppear content
for example, if image2 is appear, it can remove image1's observe?

-- 
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 #688883]: onAppear handler will be called again

2020-02-20 Thread RaiMan
Question #63 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/63

RaiMan proposed the following answer:
yes, exists exits, when the given image appears.

-- 
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 #688883]: onAppear handler will be called again

2020-02-20 Thread larryli
Question #63 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/63

larryli posted a new comment:
because, image2 will include same image like image1, so this is the reason I 
want to remove image1's observer,
and also, maybe my image is not good.

in fact, I want onAppear some image together, so I select onAppear, so I
have this question.

if I use If exists forever, it will wait continuely,  both image1 and
image2 are come out once, and then it can exit, is it right?

anyway, thanks for your answer.

-- 
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 1863949] Re: [2.0.2] VNC: capture() returns ScreenImage instead of filename

2020-02-20 Thread RaiMan
** Summary changed:

- capture is returning different data types depending on call
+ [2.0.2] VNC: capture() returns ScreenImage instead of filename

** 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 => 2.1.0

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

Title:
  [2.0.2] VNC: capture() returns ScreenImage instead of filename

Status in Sikuli:
  In Progress

Bug description:
  In 2.0.2, on 64 bit Arch Linux, depending on how capture is called it
  is no longer returning a file path. I cannot find anywhere where this
  behavior is documented and therefore am reporting it as a bug. It
  seems to be returning a java object and making a java call.

  imagePath = SCREEN.capture()
  print imagePath
  imagePath = VNC.capture()
  print imagePath
  imagePath = capture(VNC) #FYI - local screen captured
  print imagePath
  exit(0)

  Actual:
  CConnection: Server supports RFB protocol version 3.8
  CConnection: Using RFB protocol version 3.8
  org.sikuli.script.ScreenImage@59ab5f32
  org.sikuli.script.ScreenImage@4236bae8
  [info] Exit code: 0
  /tmp/Sikulix_1686686143/sikuliximage-1582144646621.png

  Expected:
  shutil.move(vnc.capture(), FULL_PATH) #from tmp

  Work around:
  img = vnc.capture().saveInBundle("temp")
  shutil.move(img, FULL_PATH) #from bundle

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1863949/+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 #688888]: Lenovo ThinkPad: Win 10 Enterprise: Click not working with Java 8 version 211 and 241

2020-02-20 Thread RaiMan
Question #68 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/68

Status: Open => Answered

RaiMan proposed the following answer:
Have you tried with Java 13?

... but this definitely is not a SikuliX problem.

... and use the latest stable SikuliX 2.0.2

-- 
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 #688888]: Lenovo ThinkPad: Win 10 Enterprise: Click not working with Java 8 version 211 and 241

2020-02-20 Thread RaiMan
Question #68 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/68

Summary changed to:
Lenovo ThinkPad: Win 10 Enterprise:  Click not working with Java 8 version 211 
and 241

-- 
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 #688886]: Defnition calling another Definition already declared.

2020-02-20 Thread RaiMan
Question #66 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/66

Status: Open => Answered

RaiMan proposed the following answer:
if a def() is defined with a positional parameter, it MUST be given when
called.

This is a variant using keyword arguments:

def teste1(event = None):
  if not event:
 popup("teste 1")

def teste2(event = None):
  if not event:
 popup("teste 2")

def teste3(event = None):
  if not event:
 popup("teste 3")

def all(event = None):
  if not event:
teste1()
teste2()
teste3()

all()

-- 
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 #688887]: Click() Implementation in Code

2020-02-20 Thread RaiMan
Question #67 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/67

RaiMan proposed the following answer:
... addition to comment#1:

org.sikuli.Script.Region::click -> org.sikuli.Script.Mouse::click

... and finally the real clicking is done via Java AWT Robot
(org.sikuli.Script.DesktopRobot)

be aware: in branch master I am currently doing some massive refactoring
(version 2.1.0), so looking into the release branch is safer ;-)

-- 
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 #688883]: onAppear handler will be called again

2020-02-20 Thread RaiMan
Question #63 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/63

Status: Needs information => Answered

RaiMan proposed the following answer:
onXXX events are registered per Region (the screen object SCREEN in your
case - the main screen).

When using observe(), ALL registered events are activitated, which are
in your case.

You already tried to deactivate the first onAppear, but it is done in
the handler, which is too late (observe already running) and the
deactivation would not run anyways, since you did not store the name
returned by onAppear().

What I do not understand:
Why don't you juste use the normal wait()?

In your case using observe(someTime) is nothing else than simply waiting
for image1/image2 to appear:

if exists("image1", FOREVER):
#do something

if exists("image2", FOREVER):
#do something else

-- 
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 #688887]: Click() Implementation in Code

2020-02-20 Thread Manfred Hampl
Question #67 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/67

Status: Open => Answered

Manfred Hampl proposed the following answer:
The repository that you are referring to is outdated.
See the README.md (bottom half of that page):
!!!This Sikuli X-1.0rc3 IS NO LONGER SUPPORTED !!!

Link to the current repository:
https://github.com/RaiMan/SikuliX1

Code for click():
https://github.com/RaiMan/SikuliX1/blob/master/API/src/main/java/org/sikuli/script/Mouse.java#LC250

-- 
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 #688883]: onAppear handler will be called again

2020-02-20 Thread Manfred Hampl
Question #63 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/63

Status: Open => Needs information

Manfred Hampl requested more information:
Is there a typo error handlerX vs. handerX ?

onAppear("image1", hander1)
def handler1(event):

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