From c24c0f195dc754c259d258a32c40e321648e33d2 Mon Sep 17 00:00:00 2001 From: Dave Amies Date: Sun, 27 Feb 2022 14:05:36 +1000 Subject: [PATCH] Clarifying the documentation This PR is just trying to make some things in the documentation that I found weren't clear at first and had to look at the code to be sure. Not every user will have the ability to read and understand the code. --- src/ImageHorizonLibrary/interaction/_operating_system.py | 7 +++++-- src/ImageHorizonLibrary/recognition/_recognize_images.py | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ImageHorizonLibrary/interaction/_operating_system.py b/src/ImageHorizonLibrary/interaction/_operating_system.py index 37c7307..c0f0b92 100644 --- a/src/ImageHorizonLibrary/interaction/_operating_system.py +++ b/src/ImageHorizonLibrary/interaction/_operating_system.py @@ -19,8 +19,11 @@ def launch_application(self, app, alias=None): On Windows, if you are using relative or absolute paths in ``app``, enclose the command with double quotes: - | Launch Application | "C:\\my folder\\myprogram.exe" | # Needs quotes | - | Launch Application | myprogram.exe | # No need for quotes | + | Launch Application | "C:\\my folder\\myprogram.exe" | # Needs quotes |||| + | Launch Application | myprogram.exe | # No need for quotes |||| + | Launch Application | myprogram.exe | arg1 | arg2 | # Program with arguments || + | Launch Application | myprogram.exe | alias=myprog | # Program with alias ||| + | Launch Application | myprogram.exe | arg1 | arg2 | alias=myprog | # Program with arguments and alias | Returns automatically generated alias which can be used with `Terminate Application`. diff --git a/src/ImageHorizonLibrary/recognition/_recognize_images.py b/src/ImageHorizonLibrary/recognition/_recognize_images.py index b2ed9d5..e2999e6 100644 --- a/src/ImageHorizonLibrary/recognition/_recognize_images.py +++ b/src/ImageHorizonLibrary/recognition/_recognize_images.py @@ -29,7 +29,7 @@ def __normalize(self, path): return path def click_image(self, reference_image): - '''Finds the reference image on screen and clicks it once. + '''Finds the reference image on screen and clicks at the centre point once. ``reference_image`` is automatically normalized as described in the `Reference image names`. @@ -225,7 +225,7 @@ def locate(self, reference_image): Fails if image is not found on screen. - Returns Python tuple ``(x, y)`` of the coordinates. + Returns Python tuple ``(x, y)`` of the coordinates matching the center point of the reference image. ''' return self._locate(reference_image) @@ -239,7 +239,7 @@ def wait_for(self, reference_image, timeout=10): ``timeout`` is given in seconds. - Returns Python tuple ``(x, y)`` of the coordinates. + Returns Python tuple ``(x, y)`` of the coordinates matching the center point of the reference image. ''' stop_time = time() + int(timeout) location = None