def send_to_ivona(): # messages by day # phone to send to phone_number = "4086809977" # testing_phone = "4085109943" # variables to be used for meals of the day lunch = "13" dinner = "18" # get message based on time of day # ex: if >=noon: remember to have some lunch etc.. breakfast_message = "Don't forget to get some caffeine and have some breakfast" lunch_message = "Don't forget to eat lunch today" dinner_message = "Don't forget to have some dinner today" # message for late nights late_nights = "I'm probably asleep by now bug, but here are a few reminders: don't be too hard on yourself, you're wonderful, beautiful and very capable. sleep well and sweet dreams <3 " anxiety = "I know the past couple weeks have been really hard to get through and it doesn't feel like it right now, but you're safe, you're ok, and this will end. I love you so much and I hope you always feel like you're flying on appa with warm winds and beautiful views. Sleep well and sweet dreams bug <3 " hydration_is_key = "drink some water. Hydration is key :)" # get time of day timeOfDay = datetime.now().strftime("%H:%M") print("time of day: ", timeOfDay) hour = timeOfDay.split(':')[0] # print(hour) # exit() # get message to send # and add reminders for the day based on the time of day it is :) message_to_Send = "REMINDER: It is: " + timeOfDay + ". I know time doesn't make sense and it's ok to loose track of time. \n" if hour > "09" and hour < lunch: message_to_Send += breakfast_message + "\n and " + hydration_is_key + " I love you and if I don't see you today sending all my love and hugs. Don't forget to write down your dreams, so you can tell me about them :')" elif hour >= lunch and hour < dinner: message_to_Send += lunch_message + "\n and " + hydration_is_key + " I love you and if I don't see you today sending all my love and hugs" elif hour > dinner and hour < "23": message_to_Send += dinner_message + "\n and " + hydration_is_key + " I love you and if I don't see you today sending all my love and hugs" else: message_to_Send = anxiety print('sending to: ', phone_number) print('sending: ', message_to_Send) try: # guid = imessage.send(phone_number, message_to_Send) imessage.send(phone_number, message_to_Send) print('SUCCESS: message sent') # sleep(5) # resp = imessage.status(guid) # print('status of message is: ', resp) # sleep(5) # print('Message was delivered at:', resp.get("date_delivered")) except Exception as e: print('ERROR: ', e)
def sleepMessage(phone, message): hour = time.localtime(time.time()).tm_hour while True: sleep(10) if not(hour > 21 and hour < 5): guid = imessage.send(phone, message) else: return False
def start(self): self.browser = webdriver.Chrome() self.browser.get(self.searchURL) time.sleep(5) self.closePopUpWindow() findOne = False # loop search while True: if findOne: time.sleep(60) findOne = False time.sleep(1) self.browser.get(self.searchURL) # loop item time.sleep(1) itemList = self.browser.find_elements_by_class_name("item-cell") for item in itemList: filterout = False for s in self.filterSet: if s.upper() in str(item.text).upper(): filterout = True break if filterout: continue try: button = item.find_element_by_class_name( "item-button-area") buttonText = button.find_element_by_xpath(".//button") if buttonText.text != "AUTO NOTIFY" and buttonText.text != "VIEW DETAILS": print("find one: " + item.text) href = item.find_element( By.CLASS_NAME, "item-title").get_attribute('href') findOne = True imessage.send(self.phone, href) time.sleep(2) except: continue
def send_message(): # import pdb; pdb.set_trace(); phone = request.form.get("phone") text = request.form.get("text") if text: message = text else: message = "Thanks for checking out balto!" # https://stackoverflow.com/questions/5137497/find-current-directory-and-files-directory # TODO: write this as a better experienc guid = imessage.send(phone, text) return jsonify({'guid': guid})
def send_words(phone_number, list_words): if imessage.check_compatibility(phone_number) == False: raise ValueError('given number not compatible') else: for message in list_words: imessage.send(phone_number, message)
def send_message(phone_number, message): imessage.send(phone_number, message)
def send_messages(lyrics, phone_num): for lyric in lyrics: imessage.send(phone_num, lyric) sleep(0.5)
from py_imessage import imessage phone = "123456789" # insert phone number of recipient imessage.send(phone, "Your text message here" ) # Change the text message you want to send to your recipient
import tweepy import time from py_imessage import imessage import pymsteams myTeamsMessage = pymsteams.connectorcard("<Microsoft Webhook URL>") myTeamsMessage.text("this is my text") myTeamsMessage.send() phone = "" guid = imessage.send(phone, "Hello World!") # Let the recipient read the message time.sleep(5) resp = imessage.status(guid) print(f'Message was read at {resp.get("date_read")}') # Your twitter API credentials api_key = '' api_secret = '' access_token_secret = '' access_token = '' # Authenticate to Twitter auth = tweepy.OAuthHandler(api_key, api_secret) auth.set_access_token(access_token, access_token_secret) # Create API object api = tweepy.API(auth)
def send_actual_message(messsage, phone_num): imessage.send(phone_num, messsage)
# Marianna Moawad - 5/13/20 # Instructions and Inspiration: https://pypi.org/project/py-iMessage/ from py_imessage import imessage import csv contactList = {} # opening txt file of message f = open("message.txt", "r") message = f.read() print("Message is -> " + message) # opening csv file with contacts with open('contacts.csv', mode='r') as csv_file: csv_reader = csv.reader(csv_file) # ignore first line next(csv_reader) for row in csv_reader: contactList[row[0]] = row[1] # messaging each person for person in contactList.keys(): print("Sending a message to " + person) # message = "Hey " + person + " How are you?" phone = contactList[person] guid = imessage.send(phone, message)
from py_imessage import imessage import time phone = "821040639514" if not imessage.check_compatibility(phone): print("Not an iPhone") while True: imessage.send(phone, "yayayayaya") print('successfully sent') time.sleep(1)
from py_imessage import imessage from time import sleep phone = "##########" #Enter the iphone number you want to message in this string with open("speech.txt", "r") as f: text = f.readlines() print(text[0]) i = 0 while (i < len(text)): guid = imessage.send(phone, text[i]) resp = imessage.status(guid) print(f'Message was read at {resp.get("date_read")}') i = i + 1
from py_imessage import imessage phone = "0123456789" #10 digit number script = open('script.txt', 'r') lines = script.readlines() for line in lines: if not line.strip(): continue imessage.send(phone, line.strip())
from py_imessage import imessage phone = "1234567890" #enter the real phone number imessage.send(phone, "Answer Me!")
from py_imessage import imessage from time import sleep phone = input("Enter a phone number: ") if not imessage.check_compatibility(phone): print("not an iPhone") guid = imessage.send(phone, "sorry testing something one last one") sleep(5) resp = imessage.status(guid) print(f'Message read at {resp.get("date_read")}')
from py_imessage import imessage phone = "7745340078" guid = imessage.send(phone, "oop deviated septum check oop") guid = imessage.send(phone, "overthinking? hahaha, no <3") guid = imessage.send( phone, "did you sleep at least 8 hours last night? i didnt think so") guid = imessage.send(phone, "exercise is the key to a long and healthy life") guid = imessage.send(phone, "productivity cycles are the worst :/")
from py_imessage import imessage import time as time phone = "7745340078" for i in range(7): guid = imessage.send(phone, "deviated septum check oop") time.sleep(10)
from py_imessage import imessage #10-Digit Phone number phone = '' #Opens and Reads file file = open('filename.txt', 'r') sentence = file.readlines() for line in sentence: imessage.send(phone, line)
from py_imessage import imessage phone = "CENSORED (usually just put in 10 digit string of nums)" if not imessage.check_compatibility(phone): print("Not an iPhone") imessage.send(phone, "hey hey i'm hungry")