0
我找不出爲什麼我一直在接收無效的語法。這裏是我無法弄清楚的功能:無端語法無效
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()
無效的語法錯誤應該告訴你它在哪一行找到它。看那條線或旁邊的一條線。那你在第二行的結尾是什麼? –
問題是第二行中的括號。我想補充一點,你忘了在第三行 – megamit
@megamit中添加括號到coordType.lower謝謝! –