Simulate input/Mouse: Difference between revisions

Content added Content deleted
(→‎{{header|Racket}}: New Racket solution)
No edit summary
Line 9: Line 9:
CoordMode, Mouse, Screen
CoordMode, Mouse, Screen
Click 400, 400 right ; relative to top left corner of the screen.</lang>
Click 400, 400 right ; relative to top left corner of the screen.</lang>

=={{header|Common Lisp}}==
{{libheader|xdotool}}
The xdotool have to be installed on the machine (installable through apt-get). Tested on Lubuntu 14.04.
<lang lisp>
(defun sh (cmd)
#+clisp (shell cmd)
#+ecl (si:system cmd)
#+sbcl (sb-ext:run-program "/bin/sh" (list "-c" cmd) :input nil :output *standard-output*)
#+clozure (ccl:run-program "/bin/sh" (list "-c" cmd) :input nil :output *standard-output*))
(sh "xdotool mousemove 0 0 click 1")
(sleep 2)
(sh "xdotool mousemove 300 300 click 1")
</lang>


=={{header|Fantom}}==
=={{header|Fantom}}==