import time, pyautogui
menuFiled = (1450, 1030)
qqLogoFiled = (1450, 920)
searchFiled = (1430, 280)
talkField = (650, 775)
friend = {
'alternate 1':'Where are you1?',
'alternate 2':'Where are you2?',
'alternate 3':'Where are you3?',
'alternate 4':'Where are you4?',
'alternate 5':'Where are you5?',
'alternate 6':'Where are you6?',
'alternate 7':'Where are you7?',
}
pyautogui.moveTo(menuFiled,duration=0.2)
time.sleep(0.2)
pyautogui.click()
pyautogui.moveTo(qqLogoFiled,duration=0.2)
time.sleep(0.2)
pyautogui.click()
for name,text in friend.items():
print('即将给{name:s}发送消息:{text:s}'.format(name=name,text=text))
pyautogui.moveTo(searchFiled,duration=0.5)
time.sleep(0.2)
pyautogui.click()
time.sleep(0.2)
pyautogui.typewrite(name)
time.sleep(1)
pyautogui.press('enter')
time.sleep(0.5)
pyautogui.typewrite(text)
pyautogui.press('enter')
time.sleep(0.5)