Created
August 29, 2020 07:32
-
-
Save coding-youtuber/6708b2b1983d4832c5018ef8914e06d3 to your computer and use it in GitHub Desktop.
Pythonを使ってLINEスタンプを連打送信する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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