{"id":278,"date":"2025-05-14T05:04:26","date_gmt":"2025-05-14T05:04:26","guid":{"rendered":"https:\/\/pearlinstitute.in\/blog\/?p=278"},"modified":"2025-05-14T05:04:27","modified_gmt":"2025-05-14T05:04:27","slug":"free-python-auto-typer-project-coding-in-python","status":"publish","type":"post","link":"https:\/\/pearlinstitute.in\/blog\/index.php\/2025\/05\/14\/free-python-auto-typer-project-coding-in-python\/","title":{"rendered":"Free Python Auto Typer Project | Coding in Python"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">\ud83d\ude80 Free Python Auto Typer Project<\/h1>\n\n\n\n<h3 class=\"wp-block-heading\">By Pearl Institute Batala<\/h3>\n\n\n\n<p>This Python Auto Typer project uses <strong>pyautogui<\/strong> to automatically open Notepad, type a message with the current date and time, save it on the Desktop with a timestamped filename, and close Notepad. It&#8217;s perfect for beginners who want to explore real-world Python automation.<\/p>\n\n\n\n<ul>\n<li>\u2705 Launches Notepad<\/li>\n\n\n\n<li>\u2705 Types a dynamic message<\/li>\n\n\n\n<li>\u2705 Saves the file with current date &amp; time<\/li>\n\n\n\n<li>\u2705 Logs the operation<\/li>\n\n\n\n<li>\u2705 Closes Notepad automatically<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"576\" src=\"https:\/\/pearlinstitute.in\/blog\/wp-content\/uploads\/2025\/05\/PYHON-AUTO-TYPER-1024x576.jpg\" alt=\"PYHON AUTO TYPER\" class=\"wp-image-279\" srcset=\"https:\/\/pearlinstitute.in\/blog\/wp-content\/uploads\/2025\/05\/PYHON-AUTO-TYPER-1024x576.jpg 1024w, https:\/\/pearlinstitute.in\/blog\/wp-content\/uploads\/2025\/05\/PYHON-AUTO-TYPER-300x169.jpg 300w, https:\/\/pearlinstitute.in\/blog\/wp-content\/uploads\/2025\/05\/PYHON-AUTO-TYPER-768x432.jpg 768w, https:\/\/pearlinstitute.in\/blog\/wp-content\/uploads\/2025\/05\/PYHON-AUTO-TYPER-1536x864.jpg 1536w, https:\/\/pearlinstitute.in\/blog\/wp-content\/uploads\/2025\/05\/PYHON-AUTO-TYPER.jpg 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">PYHON AUTO TYPER<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udcc4 Full Source Code:<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">import pyautogui\nimport time\nimport os\nfrom datetime import datetime\nimport subprocess\n\nsubprocess.Popen(['notepad.exe'])\ntime.sleep(2)\n\ncurrent_time = datetime.now().strftime(\"%Y-%m-%d %H:%M:%S\")\nmessage = f\"Automated Note\\n\\nThis message was typed by Python at {current_time}.\"\n\npyautogui.write(message, interval=0.05)\n\npyautogui.hotkey('ctrl', 's')\ntime.sleep(1)\n\nfilename = f\"note_{datetime.now().strftime('%Y%m%d_%H%M%S')}.txt\"\nfilepath = os.path.join(os.path.expanduser(\"~\"), \"Desktop\", filename)\n\npyautogui.write(filepath)\ntime.sleep(1)\npyautogui.press('enter')\n\nwith open(\"automation_log.txt\", \"a\") as log:\n    log.write(f\"{datetime.now()}: Note saved as {filename}\\n\")\n\ntime.sleep(1)\npyautogui.hotkey('alt', 'f4')\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udce6 How to Run:<\/h3>\n\n\n\n<ol>\n<li>Install Python 3.x from <a href=\"https:\/\/python.org\" target=\"_blank\" rel=\"noreferrer noopener\">python.org<\/a><\/li>\n\n\n\n<li>Run: <code>pip install pyautogui<\/code><\/li>\n\n\n\n<li>Save the code as <code>autotyper.py<\/code><\/li>\n\n\n\n<li>Run: <code>python autotyper.py<\/code><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83c\udf10 Visit Us:<\/h3>\n\n\n\n<p><a href=\"https:\/\/pearlinstitute.in\" target=\"_blank\" rel=\"noreferrer noopener\">Pearl Institute Batala<\/a> \u2014 Learn Python, Web Development, Digital Marketing, and more!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\ude80 Free Python Auto Typer Project By Pearl Institute Batala This Python Auto Typer project uses pyautogui to automatically open Notepad, type a message with the current date and time, save it on the Desktop with a timestamped filename, and close Notepad. It&#8217;s perfect for beginners who want to explore real-world Python automation. \ud83d\udcc4 Full [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":279,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,2,316],"tags":[554,544,562,565,553,551,558,560,549,92,545,542,548,543,546,557,552,563,559,561,555,564,550,567,566,556,547],"_links":{"self":[{"href":"https:\/\/pearlinstitute.in\/blog\/index.php\/wp-json\/wp\/v2\/posts\/278"}],"collection":[{"href":"https:\/\/pearlinstitute.in\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pearlinstitute.in\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pearlinstitute.in\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pearlinstitute.in\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=278"}],"version-history":[{"count":1,"href":"https:\/\/pearlinstitute.in\/blog\/index.php\/wp-json\/wp\/v2\/posts\/278\/revisions"}],"predecessor-version":[{"id":280,"href":"https:\/\/pearlinstitute.in\/blog\/index.php\/wp-json\/wp\/v2\/posts\/278\/revisions\/280"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pearlinstitute.in\/blog\/index.php\/wp-json\/wp\/v2\/media\/279"}],"wp:attachment":[{"href":"https:\/\/pearlinstitute.in\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pearlinstitute.in\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pearlinstitute.in\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}