Mouse Movement

Is it possible for my program to move the mouse outside of its window? For example, to open up a program and then click things within it?
I'm pretty sure some libraries have setmousex() functions. To actually open up a window and click things within it, it would be easier to do this if you also wrote the program instead of trying to open up Firefox for some example. Even then, is this necessary or is it just for a visual effect? There could potentially be some big security holes depending on how you implement this.
It so I can automate doing things online, since there is no open API. I want to open up a forum and make a new post, with some data copied from my program automatically. The only way seems to be to move the mouse itself?
Last edited on
You could use a system command to run your browser from the command line. Must will take an argument of a URL to open, so something like:
 
system("howeveryouopenyourbrowser webpagetoopen")
Didn't think of calling system to open up the browser. Very handy!

...But how to move the mouse and take clicks? :S
I'm proposing this as an alternative, because it unnecessary to move the mouse. For example, if I wanted to make a new post in the lounge section of this forum I would use:

Use this in your system command and all should be well. You'll have to use the escape sequence for the quotations to avoid a compiler error.
Topic archived. No new replies allowed.