Skip to content

Commit 7acebe3

Browse files
authored
Merge pull request #91 from Garvit414/main
Feature of taking screenshots Issue no #90
2 parents e26aaf3 + c95b605 commit 7acebe3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

jarvis.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import wikipedia # ********* to improve wikipedia searching
1111
import webbrowser
1212
import random
13+
import pyautogui # used to take ss
1314
import psutil # used to track resource utilization in the system
1415
import subprocess # used to run other programs
1516
import speedtest
@@ -316,6 +317,11 @@ def takeCommand(): # takes microphone inout and returns output
316317
elif 'open spotify' in query:
317318
speak("Opening spotify")
318319
webbrowser.open("spotify.com")
320+
321+
elif 'screenshot' in query:
322+
sc = pyautogui.screenshot()
323+
sc.save('pa_ss.png')
324+
speak("Screenshot taken successfully.")
319325

320326
elif "translate" in query:
321327
translator = googletrans.Translator()

0 commit comments

Comments
 (0)