Skip to content

Instantly share code, notes, and snippets.

@coding-youtuber
Created August 29, 2020 07:32
Show Gist options
  • Save coding-youtuber/6708b2b1983d4832c5018ef8914e06d3 to your computer and use it in GitHub Desktop.
Save coding-youtuber/6708b2b1983d4832c5018ef8914e06d3 to your computer and use it in GitHub Desktop.
Pythonを使ってLINEスタンプを連打送信する
import pyautogui
import time
import random
def send_sticker():
"""
スタンプを送信
"""
time.sleep(5)
# スタンプメニューを開く
pyautogui.moveTo(399, 662)
pyautogui.click()
time.sleep(5)
for i in range(10):
time.sleep(0.5)
# わっしょいスタンプを送信
pyautogui.moveTo(476, 447)
pyautogui.click()
def main():
screenWidth, screenHeight = pyautogui.size()
# print("screenWidth:{} screenHeight:{}".format(screenWidth, screenHeight))
currentMouseX, currentMouseY = pyautogui.position()
print("currentMouseX:{} currentMouseY:{}".format(currentMouseX, currentMouseY))
# time.sleep(10)
# pyautogui.moveTo(500, 1000, duration=10, tween=pyautogui.easeInOutQuad)
time.sleep(5)
messages = ["Yo", "Hello", "Who are you?", "I'm hacker", "Nice", "Great"]
for i in range(10):
pyautogui.write(random.choice(messages), interval=0.25)
time.sleep(3)
pyautogui.keyDown("enter")
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment