-
Notifications
You must be signed in to change notification settings - Fork 1
/
open1.py
29 lines (22 loc) · 913 Bytes
/
open1.py
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
import os
import command
def open_app(input):
if "chrome" in input:
command.speak("Google Chrome")
os.startfile('C:\Program Files (x86)\Google\Chrome\Application\chrome.exe')
return
elif "firefox" in input or "mozilla" in input:
command.speak("Opening Mozilla Firefox")
os.startfile('C:\Program Files\Mozilla Firefox\\firefox.exe')
return
elif "word" in input:
command.speak("Opening Microsoft Word")
os.startfile('C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2015\\Word 2015.lnk')
return
elif "excel" in input:
command.speak("Opening Microsoft Excel")
os.startfile('C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2015\\Excel 2015.lnk')
return
else:
command.speak("Application not available")
return