PyAutoGUI - Integrated Circuits - - An Online Book - |
||||||||||||||||||||
Integrated Circuits http://www.globalsino.com/ICs/ | ||||||||||||||||||||
Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix | ||||||||||||||||||||
================================================================================= The user can connect a computer running a GUI automation tool, such as SikuliX [1] or PyAutoGUI [2], to a target robot programming environment (e.g., an human-machine interfaces (HMIs) hosted on a teach pendant) to generate a program in the application environment. The Pyautogui is a cross-platform GUI automation Python module for human beings. The pyautogui module has the functions for simulating mouse clicks and movements, scrolling the mouse wheel, and typing keyboard (automation with keyboard and mouse). This saves time and allows for maintaining a unified code base, from which programs for proprietary target environments can easily be generated. PyAutoGUI is used for desktop GUIs. [4] In practice, stand-alone runtime scripts in pure python can be made using the PyAutoGUI package. The mouse can be controlled by using dedicated Python packages such as the PyAutoGUI library. PyAutoGUI had been used to make lane change decision in autonomous driving. [10] The researchers found that closing any extra window other than the IDE was smooth in terms of the package’s performance. Having a dual monitor setup would sometime lead to the simulator opening in random co-ordinates in the screen. Therefore, they used single monitor for easier execution. Their package can automate mouse-clicks and keyboard strokes. The mouse functions of PyAutoGUI use x- and y-coordinates. For mouse clicks, they recorded the coordinates of the radio buttons that were to be clicked and passed it to PyAutoGUI for execution. The x-coordinates increase positively going to the right, and the y-coordinates increase positively going down. The resolution is how many pixels wide and tall your screen is. The screen’s resolutions are listed in page4484. PyAutoGUI had been used to check the threshold limit of curves in pattern recognition. [11] In their applications, as soon as the threshold limit is crossed, the required mouse operation occur. This can be achieved with the mouse operations being connected with the python code. Operations such as scrolling, clicking, and traversing across the screen are also handled by this library. In general, pyautogui can move the mouse and type keystrokes at an incredible speed. In some cases, it might be too fast for other programs to keep up with. Stopping the program can be difficult if the mouse is moving around on its own, preventing you from breaking the process. On the other hand, pyautogui’s performance can be low when replaying a large number of mouse movements so that it takes minutes to execute some routine jobs. [6] In the operation of pyautogui script, a script can be told to wait with pyautogui.PAUSE or time.sleep after every function call. In the meantime, non-PyAutoGUI instructions will not have this pause. In summary, PyAutoGUI can be used for the GUI automation below: Table 4497. Application examples with PyAutoGUI.
====================================================== Positions of the mouse: code: ====================================================== Move the mouse to a position: code: ====================================================== Drag the mouse: code: ====================================================== Mouse clicks: code: ====================================================== Combination of mouse clicks and drag: code: ====================================================== Scroll the mouse wheel: code: ====================================================== Move the mouse: code: ====================================================== Drag the mouse: code: ====================================================== Find a similar feature and then click it : code:
[1] SikuliX. Available online: http://sikulix.com/ (accessed on 25 November 2020).
|
||||||||||||||||||||
================================================================================= | ||||||||||||||||||||
|
||||||||||||||||||||