Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Commit eb4278b

Browse files
committed
Automating Various System Operations
Used module os and pyttsx3. Very interactive and user-friendly menu-driven program.
1 parent 0010583 commit eb4278b

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

Basic-Scripts/Menu_Driven.py

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
"""This code basically automates various system operations.
2+
It is a very interactive and user-friendly program
3+
The two modules used are os and pyttsx3."""
4+
5+
def system_operations():
6+
import pyttsx3
7+
import os
8+
pyttsx3.speak("Feel free to type in any statement!")
9+
while(True):
10+
11+
operation=input("Please type which operation you want to peform? :\n ")
12+
13+
print()
14+
operation= operation.lower()
15+
16+
if("chrome" in operation) or ("browser" in operation):
17+
pyttsx3.speak("Please wait opening chrome for you")
18+
os.system("chrome")
19+
20+
elif("notepad" in operation) or ("text editor" in operation) or ("text document" in operation):
21+
pyttsx3.speak("Please wait opening notepad for you")
22+
os.system("notepad")
23+
24+
elif("media player" in operation) or ("player" in operation) or ("windows media player" in operation):
25+
pyttsx3.speak("Please wait opening media player for you")
26+
os.system("wmplayer")
27+
28+
elif("visual studio code" in operation) or ("vs code" in operation) or ("vs" in operation):
29+
pyttsx3.speak("Please wait opening vs code for you")
30+
os.system("code")
31+
32+
elif("Git Hub" in operation) or ("github" in operation):
33+
pyttsx3.speak("Please wait opening github for you")
34+
os.system("GitHubDesktop")
35+
36+
elif("microsoft edge" in operation) or ("edge" in operation) or ("microsoft browser" in operation):
37+
pyttsx3.speak("Please wait opening microsoft edge for you")
38+
os.system("msedge")
39+
40+
elif("team viewer" in operation) or ("teamviewer" in operation):
41+
pyttsx3.speak("Please wait opening team viewer for you")
42+
os.system("TeamViewer")
43+
44+
elif("microsoft paint" in operation) or ("ms paint" in operation) or ("paint" in operation):
45+
pyttsx3.speak("Please wait opening microsoft edge for you")
46+
os.system("msedge")
47+
48+
elif("website" in operation) or ("link" in operation) or ("page" in operation) or ("chrome website" in operation) or ("chrome page" in operation):
49+
website=input("Enter the link for the website or page you want to open: \n")
50+
pyttsx3.speak("Please wait opening {} for you".format(website))
51+
os.system("chrome {}".format("website"))
52+
53+
elif("microsoft word" in operation) or ("ms word" in operation) or ("word" in operation):
54+
pyttsx3.speak("Please wait opening microsoft word for you")
55+
os.system("winword")
56+
57+
elif("exit" in operation) or ("return" in operation) or ("close" in operation) or ("end" in operation):
58+
pyttsx3.speak("Thank You! Hope to see you again")
59+
break
60+
61+
else:
62+
print("Error: Try some other operation available from the list!")
63+
pyttsx3.speak("Please enter some other operation")
64+
print()
65+
66+
def main():
67+
68+
import os
69+
import pyttsx3
70+
print()
71+
pyttsx3.speak("Welcome to the automation world")
72+
print(" This Is A Menu Drive Program ! ")
73+
print()
74+
print("Available Operations:")
75+
print("1) Open Chrome \n2) Open Notepad \n3) Open Media Player \n4) Open VS Code \n5) Open Git Hub \n6) Open any Website")
76+
print("7) Open Microsoft Edge \n8) Open Team Viewer(TeamViewer) \n9) Open MS Paint(mspaint) \n10) Open MS Word ")
77+
print()
78+
print("You can type a statement and interact!")
79+
print()
80+
81+
system_operations()
82+
83+
if __name__ == "__main__":
84+
main()

0 commit comments

Comments
 (0)