Move Mouse with keyboard

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chazzy69
    New Member
    • Sep 2007
    • 196

    Move Mouse with keyboard

    Hey just doing a little expirement is it possible to change the position of the mouse at runtime with .php, i.e. in the case that u want to move the mouse with a keyboard.

    It doesn't have to be in the same document cause i know .php is pre-compiled so wont run at runtime but perhaps a pop up screen that can refresh.

    Any ideas on how to change the positon of the mouse first will be great, then ill look into how to reading in keyboard input lol.

    Any help is always appreciated
  • MarkoKlacar
    Recognized Expert Contributor
    • Aug 2007
    • 296

    #2
    Hi,

    You could start with this. It does not entirely do what you describe, I'm not quite sure you can do what you describe. Still it's an interesting thought....

    Good luck.

    /MK

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Hi.

      Are you trying to do this in a web-page?
      If so then no, you won't (and shouldn't) be able to do that.

      If you want this to control the mouse of on the server machine, then it may be possible. It would depend on your OS. Would most likely require some additional external code. I can't find any PHP extension that is meant to do this.

      Comment

      • chazzy69
        New Member
        • Sep 2007
        • 196

        #4
        Thanks for info on mouse events that should be a good place to start with recognizings mouse position on a screen.

        The next i was wondering how do i send a mouse click, is there any php function that could replicate this??

        Oh yer also i am trying to do this on a website, so it could possible need to be a bit of a mix between javascript and php.

        Thanks for the replys,

        Comment

        • MarkoKlacar
          Recognized Expert Contributor
          • Aug 2007
          • 296

          #5
          Hi,

          Just keep checking the php.net site, you'll find all the info there.
          What you're trying to do seems like a longshot but good luck.

          /MK

          Comment

          • pbmods
            Recognized Expert Expert
            • Apr 2007
            • 5821

            #6
            Heya, Chazzy.

            If you're running the script on a Mac, you should be able to shell_exec() some osascript to interact with the system. It's a big ol' hack, but what the heck; it works (:

            Comment

            Working...