I am trying to use mouse button 4 and 5 for a program but I can only use the right, left and middle button with pyautogui, do i need another library? or what? can somebody help me?
while True:
data=conexion.read(size=1)
if data ==bytes('7','utf-8'):
pyautogui.hotkey('ctrl', 'c')
elif data == bytes('4','utf-8'):
pyautogui.hotkey('ctrl', 'v')
elif data == bytes('8','utf-8'):
pyautogui.hotkey('ctrl', 'f')
elif data == bytes('C', 'utf-8'):
pyautogui.hotkey('ctrl', 'u')
elif data == bytes('*', 'utf-8'):
buscar_cs()
elif data == bytes('A', 'utf-8'):
for i in range(5):
pyautogui.moveTo(777,363)
pyautogui.click(x=777,y=363,button='middle')
pyautogui.scroll(-244)
time.sleep(0.50)
elif data == bytes('2', 'utf-8'):
for i in range(5):
pyautogui.moveTo(1022,284)
pyautogui.click(x=1022,y=284,button='left')
pyautogui.scroll(-244)
time.sleep(0.25)
elif data == bytes('D','utf-8'):
pyautogui.alert(text="Cerrado", title='ALERTA', button='OK')
break
thanks a lot