#import modules
from pynput.keyboard import *
import time
import pyautogui
#Ask user for ID and Pass
ID = int(input('Enter ID: '))
Pass = int(input('Enter Pass: '))
#Enable controller
k = Controller()
#Press and Release 'win.key'
k.press(Key.cmd)
k.release(Key.cmd)
time.sleep(1)
#Typing "zoom" with a tim.sleep
time.sleep(0.1)
k.press('z')
k.release('z')
time.sleep(0.1)
k.press('o')
k.release('o')
time.sleep(0.1)
k.press('o')
k.release('o')
time.sleep(0.1)
k.press('m')
k.release('m')
time.sleep(0.1)
#Execute enter key
k.press(Key.enter)
k.release(Key.enter)
time.sleep(2)
#Postion for mouse click
x=501
y=291
#Move mouse to position
pyautogui.moveTo(x, y, duration = 2)
#Click on the position
pyautogui.click()
#Enter Zoom credentials
k.type(ID)
k.type(Pass)
最后 2 行抛出错误:Traceback (most recent call last): File "C:/Users/rijul/Desktop/PyCharm Projects/learningclass.py", line 50, in k.type(ID) File "C:\ Users\rijul\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pynput\keyboard_base.py", line 461, in type for i, character in enumerate(string): TypeError: 'int' 对象不可迭代
PS 你需要安装 zoom 才能工作......
HUH函数
人到中年有点甜
忽然笑
相关分类