Fix method
This commit is contained in:
parent
62c678ff68
commit
5d0aaea98b
|
@ -65,16 +65,24 @@ def pressBack(eve = None):
|
|||
return ""
|
||||
|
||||
|
||||
@app.route('/update-coords/xy/<message>/<message2>')
|
||||
@app.route('/update-coords/xy/<m1>/<m2>')
|
||||
@socketio.on('update_coords', namespace='/socket.io')
|
||||
def updateCoords(message = None, message2 = None):
|
||||
def updateCoords(m1 = None, m2 = None):
|
||||
if not m2:
|
||||
try:
|
||||
parts = message.split(",")
|
||||
parts = m1.split(",")
|
||||
x = float( parts[0] )
|
||||
y = float( parts[1] )
|
||||
# print(str(x) + "," + str(y))
|
||||
pyautogui.moveRel(x, y);
|
||||
return ""
|
||||
except Exception as e:
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
x = float( m1 )
|
||||
y = float( m2 )
|
||||
# print(str(x) + "," + str(y))
|
||||
pyautogui.moveRel(x, y);
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in New Issue