Aleksmorshen commited on
Commit
da2b329
·
verified ·
1 Parent(s): 8fdba5e

Create screentest.py

Browse files
Files changed (1) hide show
  1. screentest.py +17 -0
screentest.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/data/data/com.termux/files/usr/bin/env python
2
+
3
+ import os
4
+ import time
5
+
6
+ # Путь для сохранения скриншота в галерее
7
+ output_path = "/sdcard/Pictures/screenshot_{}.png".format(int(time.time()))
8
+
9
+ # Делаем скриншот через Termux:API
10
+ os.system(f"termux-api ScreenCapture --file {output_path}")
11
+
12
+ # Проверяем, создался ли файл
13
+ if os.path.exists(output_path):
14
+ print(f"Скриншот успешно сохранён в галерее: {output_path}")
15
+ print("Теперь твоя галерея стала чуть горячее! 😏")
16
+ else:
17
+ print("Чёрт, что-то пошло не так! Проверь Termux:API или разрешения. 😈")