(contact, message)
Sends message to an active slack contact
    Args:
        contact (str): contacts name on slack
        message (str): message to send to friend
    Returns:
        None
Sends message to an active slack contact
    Args:
        contact (str): contacts name on slack
        message (str): message to send to friend
    Returns:
        None
Sends message to an active slack contact Args : contact ( str ) : contacts name on slack message ( str ) : message to send to friend Returns : None
def send_message(contact, message):
    """Sends message to an active slack contact
    Args:
        contact (str): contacts name on slack
        message (str): message to send to friend
    Returns:
        None
    """
    try:
        print('5 seconds to navigate to slack app..')
        time.sleep(5)

        # Use JumpTo slack feature
        pyautogui.hotkey('command', 'k')
        time.sleep(1)
        # Enter contact name in search box, click enter
        pyautogui.typewrite(contact)
        time.sleep(1)
        pyautogui.typewrite(['enter'])
        time.sleep(1)

        active = pyautogui.locateOnScreen('active_identifier.png')
        
        if not active:
            print(f'{contact} is not active, skipped contact')
            return
        
        print('Contact is active, sending message...')
        pyautogui.typewrite(['tab'])      
        pyautogui.typewrite(message)
        pyautogui.typewrite(['enter'])

    except KeyboardInterrupt:
        print('Process was cancelled..')
def send_message ( contact , message ) : try : print ( '5 seconds to navigate to slack app..' ) time . sleep ( 5 ) # Use JumpTo slack feature pyautogui . hotkey ( 'command' , 'k' ) time . sleep ( 1 ) # Enter contact name in search box, click enter pyautogui . typewrite ( contact ) time . sleep ( 1 ) pyautogui . typewrite ( [ 'enter' ] ) time . sleep ( 1 ) active = pyautogui . locateOnScreen ( 'active_identifier.png' ) if not active : print ( f'{contact} is not active, skipped contact' ) return print ( 'Contact is active, sending message...' ) pyautogui . typewrite ( [ 'tab' ] ) pyautogui . typewrite ( message ) pyautogui . typewrite ( [ 'enter' ] ) except KeyboardInterrupt : print ( 'Process was cancelled..' )