我无法弄清楚为什么我一直收到无效的语法。这是我无法弄清楚的功能:
def coordType():
coordType = input("Automatic [a] or manual [m] message box coordinates?"
if coordType.lower not in ("a", "m"):
print("It must be 'a' or 'm'")
coordType()
elif coordType.lower() == "a":
print("Please put your mouse over the message box")
time.sleep(5)
xc, yc = m.position()
print("Done - " + str(xc) + ", " + str(yc))
elif coordType.lower() == "m":
xcoord()
ycoord()
答案 0 :(得分:0)
尝试缩进一切。 " coordType"的主体与标题在同一对齐中,因此它在python中无效。