我在做一些,比方说,一个程序垃圾邮件发送者。在这种情况下,我使用了一个名为PyAutoGUI
的模块,它允许Python移动鼠标、打字甚至按下键盘上的按钮。在
要激活我的程序,我需要在任何窗口,然后按我的程序。例如,我在Facebook上,然后按下程序。它需要写下:我不能上Facebook。在
那么,我的程序怎么能在我的游戏窗口的后台工作呢?在
这是我的代码:
import pyautogui
import time
def spams(xywords):
x_cor = 962
y_cor=541
print(xywords)
if upali:
print("Test test")
pyautogui.click(962,541)
pyautogui.press("enter")
pyautogui.typewrite(xywords)
pyautogui.press("enter")
time.sleep(3)
pyautogui.press("enter")
pyautogui.typewrite('random stuff')
pyautogui.press("enter")
time.sleep(4)
spams("HELLO")
目前没有回答
相关问题 更多 >
编程相关推荐