-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsuperfastscreenshotter.py
51 lines (40 loc) · 1.2 KB
/
superfastscreenshotter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import pyautogui
import keyboard
import time
import tkinter as tk
from PIL import ImageGrab
from tkinter.filedialog import asksaveasfilename,askdirectory
app = tk.Tk()
app.attributes('-topmost', True)
n=asksaveasfilename()
name=n[n.rindex('/'):]
savelocation = askdirectory()
count=1
stop=0
while True:
start=time.time()
imagename= name + str(count) + '.jpg'
imagepath= savelocation+imagename
if keyboard.is_pressed('\'') and ((start-stop)>1):
n=asksaveasfilename()
name=n[n.rindex('/'):]
savelocation=askdirectory()
count=1
#Full Screen
if keyboard.is_pressed(',') and ((start-stop)>1):
im = pyautogui.screenshot()
im.save (imagepath)
count=count+1
stop=time.time()
#For Instagram Stories
elif keyboard.is_pressed('.') and ((start-stop)>1):
im = ImageGrab.grab(bbox=(674,138,1173,983))
im.save (imagepath)
count=count+1
stop=time.time()
#For Facebook Stories
elif keyboard.is_pressed('/') and ((start-stop)>1):
im = ImageGrab.grab(bbox=(944,141,1419,912))
im.save (imagepath)
count=count+1
stop=time.time()