mirror of
https://github.com/metafy-social/python-scripts.git
synced 2025-02-17 13:58:10 +00:00
commit message
This commit is contained in:
parent
577651c7cf
commit
7ca8c12f0f
19
scripts/Automate OS/Automate_OS.py
Normal file
19
scripts/Automate OS/Automate_OS.py
Normal file
|
@ -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)
|
4
scripts/Automate OS/Readme.md
Normal file
4
scripts/Automate OS/Readme.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Automating Operating System Using Python
|
||||||
|
|
||||||
|
# Dependecies
|
||||||
|
pip install PyAutoGUI
|
Loading…
Reference in New Issue
Block a user