I'm trying to automate some activities, but when I try to use the function hotkey(), an ERROR is detected:
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
Does anyone know what is wrong? My teacher used the same code and it worked.