Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Ubuntu 上使用 Python。 call(["xdotool", "mousemove", "500","600"])工作正常。
call(["xdotool", "mousemove", "500","600"])
但如果x=500, y=600,
x=500
y=600
call(["xdotool", "mousemove", "x","y"]) 不起作用。
call(["xdotool", "mousemove", "x","y"])
x和的语法应该是什么y?
x
y
像这样使用它
call(["xdotool", "mousemove", str(x), str(y)])
x并且y是指向数据的变量。但是,当您说"x"和时"y",您是在传递数据本身。
"x"
"y"
删除引号。如果您保留引号,它将被视为字符串。