forked from codehouseindia/Python-Programs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplicationopener.py
More file actions
225 lines (188 loc) · 3.75 KB
/
applicationopener.py
File metadata and controls
225 lines (188 loc) · 3.75 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
#Hi codehouse Big Fan
#This app is built to easily open any application
#It's UI is Awesome and you will also like
#Please import all the modules I have mentioned
import tkinter
from tkinter import *
import pyttsx3
import datetime
import speech_recognition as sr
import webbrowser
import os
import PIL as ImageTk
engine=pyttsx3.init("sapi5")
voices=engine.getProperty('voices')
# print(voices[1].id)
engine.setProperty('voice',voices[1].id)
def speak(audio):
engine.say(audio)
engine.runAndWait()
def opengoogle():
speak("opening google.com")
webbrowser.open("www.google.com")
def openyoutube():
speak("opening youtube.com")
webbrowser.open("www.youtube.com")
def openfacebook():
speak("opening facebook.com")
webbrowser.open("www.facebook.com")
def opendewan():
speak("opening dewanpublicschoolmeerut website")
webbrowser.open("https://dewanpublicschoolmeerut.org/")
def openppt():
speak("opening Power Point PRESENTATION")
os.startfile(r"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2013\PowerPoint 2013.lnk")
def openword():
speak("opening Microsoft word")
os.startfile(r"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2013\Word 2013.lnk")
def openwats():
speak("opening whatsapp web")
webbrowser.open("https://web.whatsapp.com/")
def time():
now = datetime.datetime.now()
print ("Current date and time : ")
print (now.strftime("%Y-%m-%d %H:%M:%S"))
def opengmail():
speak('opening gamil.com')
webbrowser.open("https://mail.google.com/mail/u/0/?tab=rm&ogbl#inbox")
def quit1():
root.destroy()
#google_img=PhotoImage(file=r"C:\Users\PCL\Desktop\JARVIS\image\google.png")
root= tkinter.Tk()
root.title("Abhra")
root.geometry("600x600")
root.configure(background="#00CCCD",bd=10)
time()
################ MY IMAGES ########################
#photo=PhotoImage(file=r"C:\Users\PCL\Desktop\JARVIS\image\google.png")
lbl1=Label(
root,
text=("Abhra's APPLICATION OPENER"),
font=("Verdana",20,"bold"),
bg="yellow",
fg="red",
width=50,
relief= FLAT,
bd=5
)
lbl1.pack()
lbl2=Label(
root,
text=("One Place To Open Any Application"),
font=("Verdana",20,"bold"),
bg="#45CE30",
fg="white",
width=50,
relief= GROOVE
)
lbl2.pack()
google=Button(
root,
text=("GOOGLE.COM"),
font=("Verdana",14,"bold"),
#image=photo,
command=opengoogle,
height=2,
width=25,
relief=GROOVE,
bg="white",
fg="black"
)
google.pack(side=TOP)
youtube=Button(
root,
text=("YOUTUBE.COM"),
font=("Verdana",14,"bold"),
command=openyoutube,
height=2,
width=25,
relief=GROOVE,
bg="white",
fg="black"
)
youtube.pack()
gamil=Button(
root,
text=("GMAIL.COM"),
font=("Verdana",14,"bold"),
command=opengmail,
height=2,
width=25,
relief=GROOVE,
bg="white",
fg="black"
)
gamil.pack()
facebook=Button(
root,
text=("FACEBOOK.COM"),
font=("Verdana",14,"bold"),
command=openfacebook,
height=2,
width=25,
relief=GROOVE,
bg="white",
fg="black"
)
facebook.pack()
dewan=Button(
root,
text=("DEWANs SCHOOL"),
font=("Verdana",14,"bold"),
command=opendewan,
height=2,
width=25,
relief=GROOVE,
bg="white",
fg="black"
)
dewan.pack()
ppt=Button(
root,
text=("POWERPOINT PRESENTATION"),
font=("Verdana",14,"bold"),
command=openppt,
height=2,
width=25,
relief=GROOVE,
bg="white",
fg="black"
)
ppt.pack()
word=Button(
root,
text=("MICROSOFT WORD"),
font=("Verdana",14,"bold"),
command=openword,
height=2,
width=25,
relief=GROOVE,
bg="white",
fg="black"
)
word.pack()
wats=Button(
root,
text=("WHATSAPP WEB"),
font=("Verdana",14,"bold"),
command=openwats,
height=2,
width=25,
relief=GROOVE,
bg="white",
fg="black"
)
wats.pack()
quit=Button(
root,
text=("WHATSAPP WEB"),
font=("Verdana",14,"bold"),
command=quit1,
height=2,
width=25,
relief=GROOVE,
bg="white",
fg="black"
)
quit.pack()
root.mainloop()