Python Gives Syntax Error But There Is No Mistake?
Can someone say why python doesn't allow this? # -*- coding: utf-8 -* import win32api,win32con,os,time,sys x_pad =464 y_pad =235 def tik(): win32api.mouse_event(win32con.MOUSE
Solution 1:
Look at the code immediately above the reported error:
def mousePos(cord):
win32api.SetCursorPos((x_pad + cord[0], y_pad + cord[1])
You're missing a closing parentheses.
Solution 2:
You sure there's no syntax error?
win32api.SetCursorPos((x_pad + cord[0], y_pad + cord[1])
12 2 1???
The line that a syntax error is reported on is not necessary where the syntax error is. It's merely the first place where an earlier syntax error caused the parser to realize that something's wrong.
Post a Comment for "Python Gives Syntax Error But There Is No Mistake?"