문제

I am using Python on Ubuntu. call(["xdotool", "mousemove", "500","600"])works fine.

But if x=500, y=600,

call(["xdotool", "mousemove", "x","y"]) does not work.

What should be the syntax of x and y?

도움이 되었습니까?

해결책

use it like this

call(["xdotool", "mousemove", str(x), str(y)])

x and y are variables which are pointing to data. But when you say, "x" and "y", you are passing the data itself.

다른 팁

Remove the quotes. If you keep quotes, it will treat as a string.

call(["xdotool", "mousemove", "500","600"])

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top