【发布时间】:2021-10-14 09:10:36
【问题描述】:
我正在尝试自动化一些活动,但是当我尝试使用函数 hotkey() 时,检测到一个错误:
import pyautogui
import pyperclip
# Step 1 - Open the link in a new tab
pyautogui.PAUSE = 1
pyautogui.hotkey('ctrl','t') #open a new tab
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-37-2e2b6412b575> in <module>
6 pyautogui.PAUSE = 1
7
----> 8 pyautogui.hotkey('ctrl','t') #open a new tab
9
TypeError: 'tuple' object is not callable
有谁知道怎么回事?我的老师使用了相同的代码,并且成功了。
【问题讨论】:
标签: python automation typeerror pyautogui