Salve a tutti, stavo facendo un programma che muovesse il mouse in un punto in maniera fluida senza "teletrasportarlo"
Però quando lo avvio mi va sempre in loop nel while:
while bm!=b:
if am <= a:
---while True:
------time.sleep(0.01)
------mouse.position = (am, bm)
------print(am)
------print(a)
------if am==a:
---------bmc
------am=am+1
Non capisco il problema , per favore aiutatemi.
from pynput.mouse import Button, Controller
import time
import random
mouse = Controller()
a=int(0)
b=int(0)
c=int(0)
am=int(0)
bm=int(0)
def bmc():
while bm!=b:
if bm < b:
while True:
time.sleep(0.01)
mouse.position = (am, bm)
bm=abm+1
print(bm)
if bm > b:
while True:
time.sleep(0.01)
mouse.position = (am, bm)
bm=abm-1
print(bm)
while True:
time.sleep(c)
c = random.randint(1 ,10)
a = random.randint(1,1366)
b = random.randint(1,768)
mouse.position = (am, bm)
while bm!=b:
if am <= a:
while True:
time.sleep(0.01)
mouse.position = (am, bm)
print(am)
print(a)
if am==a:
bmc
am=am+1
if am > a:
while True:
time.sleep(0.01)
mouse.position = (am, bm)
am=am-1
print(am)
if am==a:
bmc
am = a
bm = b