|
发表于 2023-11-19 16:27:44
|
显示全部楼层
import time
from pynput.keyboard import Controller as key_col
from pynput.mouse import Button, Controller
def keyboard_input(string):
keyboard = key_col()
keyboard.type(string)
def mouse_click():
mouse = Controller()
mouse.press(Button.left)
mouse.release(Button.left)
11518
def main(number, string):
print('ready to bomb')
time.sleep(5)
for i in range(number):
keyboard_input(string + str (i))
mouse_click()
time.sleep(0.5)
print('the news bombing is over')
if __name__ == '__main__':
main(100, '11')
也可以
|
|