From 7ca8c12f0f7c34e390b3276cfa5b83aa0c7f5ee2 Mon Sep 17 00:00:00 2001 From: Kunal Patil Date: Tue, 11 Oct 2022 21:18:33 +0530 Subject: [PATCH] commit message --- scripts/Automate OS/Automate_OS.py | 19 +++++++++++++++++++ scripts/Automate OS/Readme.md | 4 ++++ 2 files changed, 23 insertions(+) create mode 100644 scripts/Automate OS/Automate_OS.py create mode 100644 scripts/Automate OS/Readme.md diff --git a/scripts/Automate OS/Automate_OS.py b/scripts/Automate OS/Automate_OS.py new file mode 100644 index 0000000..5479205 --- /dev/null +++ b/scripts/Automate OS/Automate_OS.py @@ -0,0 +1,19 @@ +# Automate Win, Mac and Linux +# pip install PyAutoGUI +import pyautogui as py +# Mouse Movements +py.moveTo(100, 100) +py.moveTo(200, 200, duration=1) +py.click(100, 100) +py.doubleClick(200, 200) +# Keyboard Inputs +py.write('Hello World!', interval=0.25) +py.press('enter') +py.hotkey('ctrl', 'c') +py.keyDown('shift') +py.keyUp('shift') +# Screen Automation +img = py.screenshot('screenshot.jpg') +img.save('screenshot.jpg') +loc = py.locationsOnScreen('icon.jpg') +print(loc) \ No newline at end of file diff --git a/scripts/Automate OS/Readme.md b/scripts/Automate OS/Readme.md new file mode 100644 index 0000000..2711a1d --- /dev/null +++ b/scripts/Automate OS/Readme.md @@ -0,0 +1,4 @@ +# Automating Operating System Using Python + +# Dependecies + pip install PyAutoGUI