By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,712 Members | 2,174 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,712 IT Pros & Developers. It's quick & easy.

Move Mouse with keyboard

P: 196
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
Sep 22 '08 #1
Share this Question
Share on Google+
5 Replies

Expert 100+
P: 296

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.

Sep 22 '08 #2

Expert 5K+
P: 5,058

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.
Sep 22 '08 #3

P: 196
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,
Sep 22 '08 #4

Expert 100+
P: 296

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

Sep 22 '08 #5

Expert 5K+
P: 5,821
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 (:
Sep 23 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.