{"id":556,"date":"2020-02-19T09:00:00","date_gmt":"2020-02-19T09:00:00","guid":{"rendered":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/codersrefuge.000webhostapp.com\/?page_id=556"},"modified":"2022-05-25T04:48:16","modified_gmt":"2022-05-25T04:48:16","slug":"python-pyautogui","status":"publish","type":"page","link":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/","title":{"rendered":"Python pyautogui &#8211; automating your computer"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">What is Python pyautogui?<\/h3>\n\n\n\n<p><strong>PyAutoGUI<\/strong>&nbsp;is a cross-platform GUI automation Python module for human beings. It is used to programmatically control the mouse and keyboard as a human might. Because of this, the Python pyautogui library proves very useful when it comes to automating tasks on your computer. <\/p>\n\n\n\n<div style=\"height:26px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Installation<\/h3>\n\n\n\n<p>Pyautogui has a few dependencies that need to be downloaded before we can use it. <em><strong>Windows Users will already have these dependencies pre-installed<\/strong><\/em>, so they are not required to install anything besides the pyautogui library itself.<\/p>\n\n\n\n<p>Run the following commands in your command prompts for your respective Operating System. <\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Windows<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install pyautogui<\/code><\/pre>\n\n\n\n<div style=\"height:19px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Mac <\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>pip3 install pyobjc-core\npip3 install pyobjc\npip3 install pyautogui<\/code><\/pre>\n\n\n\n<div style=\"height:19px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Linux<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>pip3 install python3-xlib\npip3 install pyautogui<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Screen Based Functions<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">size() Function:<\/h4>\n\n\n\n<p>This function gives you the size of the screen by returning the maximum x and y co-ordinates available. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>print(pyautogui.size())<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Size(width=1920, height=1080)<\/code><\/pre>\n\n\n\n<hr>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>position() Function: <\/strong><\/h4>\n\n\n\n<p>This function gives you the co-ordinates of the mouse cursor on the screen. Returns X and Y co-ordinates.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>print(pyautogui.position())<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Point (x = 587, y = 486)<\/code><\/pre>\n\n\n\n<hr>\n\n\n\n<h4 class=\"wp-block-heading\">onScreen Function()<\/h4>\n\n\n\n<p>The onScreen Function tell us whether a specific position exists on screen. Returns true if the position exists, otherwise False.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>print(pyautogui.onScreen(400, 500))\nprint(pyautogui.onScreen(4000, 5000))<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>True\nFalse<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Mouse Functions<\/h3>\n\n\n\n<p>You can move the cursor using the <code>moveTo()<\/code> function which takes the x and y coordinates as input. <\/p>\n\n\n\n<p>You should understand how the co-ordinate system for the display screen works in Python. The value of&nbsp;<code>x_coordinate<\/code>&nbsp;increases from left to right on the screen, and the value of&nbsp;<code>y_coordinate<\/code>&nbsp;increases from top to bottom. Basically, the value of both the&nbsp;<code>x_coordinate<\/code>&nbsp;and&nbsp;<code>y_coordinate<\/code>&nbsp;at the top left corner of the screen is 0. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.moveTo(x, y, time_in_seconds)<\/code><\/pre>\n\n\n\n<p>The <em>time_in_seconds<\/em> is an important parameter to consider. This parameter decides how long the cursor will take to &#8220;move to&#8221; the location specified. Sometimes, while trying to automate a program or something, you want to be able to see your automated cursor move. If the value is really low, your cursor will be zipping around all over the place. Keeping it at a value like 1-2 will allow you to see it as it moves.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Moves the cursor relative to current position of pointer on screen.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.moveRel(x, y, duration = time)<\/code><\/pre>\n\n\n\n<p>Normally if you pass an x or y value, the cursor moves you to that location. Like passing 100 and 100 will move the cursor to coordinates (100, 100) of the screen. With the <code>moveRel()<\/code> function however, movement is relative. So passing 100 and 100 as x and y values will move the cursor 100 pixels to the right and 100 pixels downwards.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Click Functions<\/h3>\n\n\n\n<p>The following functions deal with automating mouse clicks in a variety of ways. The names of the Functions are pretty self-explanatory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.rightClick(x, y) <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.doubleClick(x, y)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.tripleClick(x, y)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.middleClick(x, y) <\/code><\/pre>\n\n\n\n<p>The <code>middleClick<\/code> button usually refers to the scroll wheel, which can actually be clicked. <\/p>\n\n\n\n<div style=\"height:31px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Don&#8217;t confuse these two functions for Mouse clicks. The <code>mouseDown()<\/code> function will keep the mouse &#8220;clicked down&#8221; until the <code>mouseUp()<\/code> function is called. May come useful in automating selections (where you click down and drag your mouse across the screen).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.mouseDown(x=x, y=y, button='left')<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.mouseUp(x=x, y=y, button='left') <\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Dragging the Mouse<\/h3>\n\n\n\n<p>Using <code>pyautogui.drag()<\/code>, we can have the mouse hold itself down and drag itself across the screen, selecting everything in it&#8217;s path. It takes several parameters, the main ones being the three shown below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.drag(x= 100, y= 100, duration= 1)<\/code><\/pre>\n\n\n\n<p>One important thing to note here, is that the x and y values are relative offsets, not specfic coordinates on the screen. <\/p>\n\n\n\n<p>This function is a better alternative to using <code>mouseUp()<\/code> and <code>mouseDown()<\/code> for scrolling, as it saves you an extra function call.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Scrolling the Mouse<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.scroll(amount_to_scroll, x=x_movement, y=y_movement) <\/code><\/pre>\n\n\n\n<p> This will store a&nbsp;<a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/pillow.readthedocs.io\/en\/stable\/\">PIL<\/a>&nbsp;object containing the image in a variable. <\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Keyboard Automation<\/h3>\n\n\n\n<p><strong>Pyautogui<\/strong> also performs many keyboard like commands. Once again, these are very self-explanatory.  The Hotkey function first presses shift and then enter, exactly as a regular human might.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.hotkey('shift', 'enter') <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.hotkey('ctrl', '2' ) <\/code><\/pre>\n\n\n\n<div style=\"height:39px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>If you just want single key presses instead, you can use the <code>pyautogui.press()<\/code> function as follows.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.press('a')\npyautogui.press('enter')<\/code><\/pre>\n\n\n\n<p>To learn more about <a href=\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/pyautogui-keyboard-automation\/\">Keyboard Automation<\/a> in PyAutoGUI, refer to it&#8217;s dedicated tutorial. <\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Prompt Functions <\/h3>\n\n\n\n<p>Below are a list of common prompt functions. Each of them brings up a unique prompt with a different GUI. The alert prompt brings up a window with an exclamation mark for instance. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.confirm(\"Are you ready?\") <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.alert(\"The program has crashed!\") <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>pyautogui.prompt(\"Please enter your name: \") <\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>This marks the end of the Python pyautogui Article. Any suggestions or contributions for CodersLegacy are more than welcome. Questions can be asked in the comment section below.<\/p>\n\n\n\n<p>Link to the Python Libraries Section: <em><a href=\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/libraries-in-python\/\">link<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Python pyautogui? PyAutoGUI&nbsp;is a cross-platform GUI automation Python module for human beings. It is used to programmatically control the mouse and keyboard as a human might. Because of this, the Python pyautogui library proves very useful when it comes to automating tasks on your computer. Installation Pyautogui has a few dependencies that need &#8230; <a title=\"Python pyautogui &#8211; automating your computer\" class=\"read-more\" href=\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/\" aria-label=\"More on Python pyautogui &#8211; automating your computer\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":199,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","footnotes":""},"class_list":["post-556","page","type-page","status-publish"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python pyautogui - automating your computer - CodersLegacy<\/title>\n<meta name=\"description\" content=\"PyAutoGUI is a cross-platform GUI automation Python module for human beings. It is used to programmatically control the mouse and keyboard as a human might.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python pyautogui - automating your computer - CodersLegacy\" \/>\n<meta property=\"og:description\" content=\"PyAutoGUI is a cross-platform GUI automation Python module for human beings. It is used to programmatically control the mouse and keyboard as a human might.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/\" \/>\n<meta property=\"og:site_name\" content=\"CodersLegacy\" \/>\n<meta property=\"article:modified_time\" content=\"2022-05-25T04:48:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/wp-content\/uploads\/2020\/04\/CodersLegacy1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1424\" \/>\n\t<meta property=\"og:image:height\" content=\"736\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/\",\"url\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/\",\"name\":\"Python pyautogui - automating your computer - CodersLegacy\",\"isPartOf\":{\"@id\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/#website\"},\"datePublished\":\"2020-02-19T09:00:00+00:00\",\"dateModified\":\"2022-05-25T04:48:16+00:00\",\"description\":\"PyAutoGUI is a cross-platform GUI automation Python module for human beings. It is used to programmatically control the mouse and keyboard as a human might.\",\"breadcrumb\":{\"@id\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python Libraries\",\"item\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Python pyautogui &#8211; automating your computer\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/#website\",\"url\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/\",\"name\":\"CodersLegacy\",\"description\":\"Imparting knowledge to the Future\",\"publisher\":{\"@id\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/#\/schema\/person\/561a3b194ec717af58f3de2cf596a928\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/#\/schema\/person\/561a3b194ec717af58f3de2cf596a928\",\"name\":\"Siddiqi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/wp-content\/uploads\/2023\/02\/CodersLegacyLogo.jpg\",\"contentUrl\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/wp-content\/uploads\/2023\/02\/CodersLegacyLogo.jpg\",\"width\":340,\"height\":74,\"caption\":\"Siddiqi\"},\"logo\":{\"@id\":\"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/\/\/coderslegacy.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python pyautogui - automating your computer - CodersLegacy","description":"PyAutoGUI is a cross-platform GUI automation Python module for human beings. It is used to programmatically control the mouse and keyboard as a human might.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/","og_locale":"en_US","og_type":"article","og_title":"Python pyautogui - automating your computer - CodersLegacy","og_description":"PyAutoGUI is a cross-platform GUI automation Python module for human beings. It is used to programmatically control the mouse and keyboard as a human might.","og_url":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/","og_site_name":"CodersLegacy","article_modified_time":"2022-05-25T04:48:16+00:00","og_image":[{"width":1424,"height":736,"url":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/wp-content\/uploads\/2020\/04\/CodersLegacy1.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/","url":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/","name":"Python pyautogui - automating your computer - CodersLegacy","isPartOf":{"@id":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/#website"},"datePublished":"2020-02-19T09:00:00+00:00","dateModified":"2022-05-25T04:48:16+00:00","description":"PyAutoGUI is a cross-platform GUI automation Python module for human beings. It is used to programmatically control the mouse and keyboard as a human might.","breadcrumb":{"@id":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/python-pyautogui\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/"},{"@type":"ListItem","position":3,"name":"Python Libraries","item":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/python\/libraries-in-python\/"},{"@type":"ListItem","position":4,"name":"Python pyautogui &#8211; automating your computer"}]},{"@type":"WebSite","@id":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/#website","url":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/","name":"CodersLegacy","description":"Imparting knowledge to the Future","publisher":{"@id":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/#\/schema\/person\/561a3b194ec717af58f3de2cf596a928"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/#\/schema\/person\/561a3b194ec717af58f3de2cf596a928","name":"Siddiqi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/#\/schema\/person\/image\/","url":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/wp-content\/uploads\/2023\/02\/CodersLegacyLogo.jpg","contentUrl":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/wp-content\/uploads\/2023\/02\/CodersLegacyLogo.jpg","width":340,"height":74,"caption":"Siddiqi"},"logo":{"@id":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/\/\/coderslegacy.com"]}]}},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Siddiqi","author_link":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/author\/raahim-shotmail-com\/"},"uagb_comment_info":0,"uagb_excerpt":"What is Python pyautogui? PyAutoGUI&nbsp;is a cross-platform GUI automation Python module for human beings. It is used to programmatically control the mouse and keyboard as a human might. Because of this, the Python pyautogui library proves very useful when it comes to automating tasks on your computer. Installation Pyautogui has a few dependencies that need&hellip;","_links":{"self":[{"href":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/wp-json\/wp\/v2\/pages\/556","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/wp-json\/wp\/v2\/comments?post=556"}],"version-history":[{"count":4,"href":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/wp-json\/wp\/v2\/pages\/556\/revisions"}],"predecessor-version":[{"id":10606,"href":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/wp-json\/wp\/v2\/pages\/556\/revisions\/10606"}],"up":[{"embeddable":true,"href":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/wp-json\/wp\/v2\/pages\/199"}],"wp:attachment":[{"href":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/coderslegacy.com\/wp-json\/wp\/v2\/media?parent=556"}],"curies":[{"name":"wp","href":"https:\/\/siteproxy.myworkereeez.workers.dev/:443\/https\/api.w.org\/{rel}","templated":true}]}}