Here's my script:
import pyautogui
import subprocess
import time
#notepad is in the file path
programma = "Notepad"
#opening notepad
subprocess.Popen(programma)
#gives time to open notepad, ie I've also tried with higher numbers
time.sleep(1)
pyautogui.keyDown('NumLock')
#I've also tried with
pyautogui.hotkey('alt', 'num3')
I've tried and the Numpad works: if I comment the take out 'alt' and just write
pyautogui.press('num3')
it types the number 3.
Although if I put alt in the code, it gives an error, as if I were typing without having the cursor set.
I've also tried
pyautogui.keyDown('alt')
pyautogui.keyDown('num3')
pyautogui.keyUp('num3')
pyautogui.keyUp('alt')
Does anyone know what to do? Thanks in advance