Example #1
0
def open_whatsapp(self):
    speak("tell number of reciver")
    if speak_is_on():
        reciver = take_input(self)
    else:
        reciver = take_input(self)    
    speak("say your context")
    if speak_is_on():
        context = take_input(self)
    else:
        context = take_input(self)

    try: 
        now = datetime.now()

        hour = int(now.strftime("%H"))
        minute = int(now.strftime("%M"))
        print(f"Reciver : {reciver}")
        print(f"Context : {context}")
        print(f"{hour}")
        print(f"{minute}")
        # sending message to reciever 
        # using pywhatkit 
        pywhatkit.sendwhatmsg(f"+91{reciver}", f"{context}", hour, minute+1)
        return("Successfully Sent!") 

    except: 
        
        # handling exception 
        # and printing error message 
        return("An Unexpected Error!")
def output(o):

    print(assistant_details.name + ":" + o)
    print()

    if speak_is_on():
        speak(o)
Example #3
0
def output(o):
    #command line output

    print(Fore.RED + assistant_details.name + ": " + o + Fore.RESET)

    if speak_is_on():
        speak(o)
    print()
def speak(usertext):
    if speak_is_on():
        engine.say(usertext)
        engine.runAndWait()
    else:
        msg = QMessageBox()
        msg.setWindowTitle(f"{assistant_details.name}")
        msg.setText(f"{usertext}")
        x = msg.exec_()
Example #5
0
def open_sites(self):
    speak("say site name with its dot extension")
    if speak_is_on():
        said1 = take_input(self)
    else:
        said1 = take_input(self)
    said = said1.lower().replace(" ","")
    webbrowser.open(f"https://{said}")
    return (said)
Example #6
0
def open_comsites(self):
    speak("say com site name")
    if speak_is_on():
        said1 = take_input(self)
    else:
        said1 = take_input(self)     
    said = said1.lower().replace(" ","")
    webbrowser.open(f"https://{said}.com")
    return (said)
def output(o):

    #command line output

    if speak_is_on():
        speak(o)

    print(assistant_details.name + ":" + o)
    print()
def take_input(self):
    if speak_is_on():
        i = speak_module.get_audio()
    else:
        text, okPressed = QInputDialog.getText(self, "Get text",
                                               "enter your query:",
                                               QLineEdit.Normal, "")
        if okPressed and text != '':
            i = text
        else:
            i = "no query"
    return i
Example #9
0
def give_output(o):

    if speak_is_on():
        if o == "signing off sir":
            speak(o)
            os._exit(0)
        else:
            speak(o)
    msg = QMessageBox()
    msg.setWindowTitle(f"{assistant_details.name}")
    msg.setText(f'{assistant_details.name}: {o}')
    x = msg.exec_()

    print(f'{assistant_details.name}: {o}')
    print()