AI ASSISTANT FROM BASIC TO ADVANCE - PART - 3

# ADDING PyAutiGUI FEATURES

Tutorial - Part - 3

#Function/Features:

- Open the hidden menu
- Open the Task Manager
- Open the Task View
- Take screenshot
- Take Snip
- Open setting
- Close this app
- Add a new virtual desktop
# GITHUB: PART - 3 
Instalation
  • pip install PyAutoGUI

window 10 keyboard shortcuts

# Here are the few examples
#Feature: Open the hidden menu
→ Add in Main --> Nested_elif
  1. elif "hidden menu" in query:
  2. # Win+X: Open the hidden menu
  3. pyautogui.hotkey('winleft', 'x')
#Feature: Open the Task Manager
→ Add in Main --> Nested_elif
  1. elif "task manager" in query:
  2. # Ctrl+Shift+Esc: Open the Task Manager
  3. pyautogui.hotkey('ctrl', 'shift', 'esc')
#Feature:  Open the Task View
→ Add in Main --> Nested_elif
  1. elif "task view" in query:
  2. # Win+Tab: Open the Task view
  3. pyautogui.hotkey('winleft', 'tab')
#Feature:Take screenshot
→ Add in Main --> Nested_elif
elif "take screenshot" in query:
# win+perscr
pyautogui.hotkey('winleft', 'prtscr')
speak("done")

# Take screenshot save in Given location
'''
elif "take screenshot" in query:
img = pyautogui.screenshot()
img.save("D:/screenshot_1.png") # file mane and location
speak("Done")
'''
#Feature:Take screenshot
→ Add in Main --> Nested_elif
  1. elif "snip" in query:
  2. pyautogui.hotkey('winleft', 'shift', 's')
#Feature:close this app
→ Add in Main --> Nested_elif
  1. elif "close the app" in query:
  2. pyautogui.hotkey('alt','f4')
#Feature:Open setting
→ Add in Main --> Nested_elif
  1. elif "setting" in query:
  2. # win+i = open setting
  3. pyautogui.hotkey('winleft', 'i')
#Feature: Add a new virtual desktop
→ Add in Main --> Nested_elif
  1. elif "new virtual desktop" in query:
  2. # Win+Ctrl+D: Add a new virtual desktop
  3. pyautogui.hotkey('winleft', 'ctrl', 'd')

#Full code of part-3

#JARVIS-PART-3-CODE

PART-4 COMING SOON!
WITH ADVANCED FEATURES

COMMENT IF YOU FACE ANY PROBLEM

4 Comments

If you have any doubts, please let me know

Previous Post Next Post