Skip to content

Commit 7ca8c12

Browse files
committed
commit message
1 parent 577651c commit 7ca8c12

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

scripts/Automate OS/Automate_OS.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Automate Win, Mac and Linux
2+
# pip install PyAutoGUI
3+
import pyautogui as py
4+
# Mouse Movements
5+
py.moveTo(100, 100)
6+
py.moveTo(200, 200, duration=1)
7+
py.click(100, 100)
8+
py.doubleClick(200, 200)
9+
# Keyboard Inputs
10+
py.write('Hello World!', interval=0.25)
11+
py.press('enter')
12+
py.hotkey('ctrl', 'c')
13+
py.keyDown('shift')
14+
py.keyUp('shift')
15+
# Screen Automation
16+
img = py.screenshot('screenshot.jpg')
17+
img.save('screenshot.jpg')
18+
loc = py.locationsOnScreen('icon.jpg')
19+
print(loc)

scripts/Automate OS/Readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Automating Operating System Using Python
2+
3+
# Dependecies
4+
pip install PyAutoGUI

0 commit comments

Comments
 (0)