-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e11b03c
commit c764caf
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
pillow | ||
fpdf | ||
pytesseract | ||
pyautogui | ||
keyboard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import pyautogui | ||
import keyboard | ||
|
||
''' | ||
This screenshot progam works on Mac only. You will need to change the keybind if you are using a different OS. | ||
This program needs to control your computer to screenshot so it may need more perms. Sudo should work. | ||
run in terminal at the image processing folder: sudo python3 screenshotter.py | ||
''' | ||
|
||
def press_screenshot_keybind(): | ||
# Simulate pressing Command + Shift + 5 | ||
pyautogui.hotkey('command', 'shift', '5') | ||
|
||
def on_c_key(): | ||
press_screenshot_keybind() | ||
|
||
# Bind the 'c' key to trigger the screenshot keybind | ||
keyboard.add_hotkey('c', on_c_key) | ||
|
||
print("Press 'c' to trigger the screenshot keybind (Command + Shift + 5).") | ||
print("Press 'esc' to exit the program.") | ||
|
||
# Keep the script running | ||
keyboard.wait('esc') | ||
|