you'll be prompted to enter your password to confirm these changes staying on track before you jump into gui automationyou should know how to escape problems that may arise python can move your mouse and type keystrokes at an incredible speed in factit might be too fast for other programs to keep up with alsoif something goes wrong but your program keeps moving the mouse aroundit will be hard to tell what exactly the program is doing or how to recover from the problem like the enchanted brooms from disney' the sorcerer' apprenticewhich kept filling--and then overfilling--mickey' tub with wateryour program could get out of control even though it' following your instructions perfectly stopping the program can be difficult if the mouse is moving around on its ownpreventing you from clicking the mu editor window to close it fortunatelythere are several ways to prevent or recover from gui automation problems pauses and fail-safes if your program has bug and you're unable to use the keyboard and mouse to shut it downyou can use pyautogui' fail-safe feature quickly slide the mouse to one of the four corners of the screen every pyautogui function call has th-of- -second delay after performing its action to give you enough time to move the mouse to corner if pyautogui then finds that the mouse cursor is in cornerit raises the pyautogui failsafeexception exception non-pyautogui instructions will not have this th-of- -second delay if you find yourself in situation where you need to stop your pyautogui programjust slam the mouse toward corner to stop it shutting down everything by logging out perhaps the simplest way to stop an out-of-control gui automation program is to log outwhich will shut down all running programs on windows and linuxthe logout hotkey is ctrl-altdel on macosit is shiftoption- by logging outyou'll lose any unsaved workbut at least you won' have to wait for full reboot of the computer controlling mouse movement in this sectionyou'll learn how to move the mouse and track its position on the screen using pyautoguibut first you need to understand how pyautogui works with coordinates the mouse functions of pyautogui use xand -coordinates figure - shows the coordinate system for the computer screenit' similar to the coordinate system used for imagesdiscussed in the originwhere controlling the keyboard and mouse with gui automation