Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Some advice on programming needed


Mouzi's Avatar
Member
0 0

I am trying to write a program that would be able to

  1. react on mouse clicks anywhere (not only on the program window itself)
  2. get the mouse coordinates
  3. move the mouse to specific coordinates and click there

I haven't coded much in any "real" programming languages, just some python and C++, but I still can't do pretty much anything with them. I tried this today with C++, tried to find something with google and realised that there is absolutely no information on making anything with C++ available. (I've tried to look for some things before and it was the same.) The only thing I found out is that you have to use hooks, but then I got stuck because there wasn't any information on hooks except MSDN reference, but it didn't help much because there are no examples and I don't know enough C++ to work from the syntax only. Then, after I got frustrated with this whole shit, someone pointed out that I should use some "more hi-level language" for this.

So now, what I'm asking is that first of all should I do this with some existing program (I would want the program to do this: I rightclick on the screen -> it stores the coordinates -> I move the mouse elsewhere -> I press some key -> the program clicks at the current coordinates and moves cursor back to the stored coordinates.), or should I still try to code this myself? And if I should code it what language should I use? And some advice on what to google for or some links to more reading would be appreciated :)


richohealey's Avatar
Python Ninja
0 0

Several points….

a) what the fuck is "NOT REAL" about c++ and python?!

b) what platform? If you're writing this for unix then it's nmot too ahrd to do with various X api's.

Windows is doable with python, but you'll need to build an event catcher, all sort of fun.

Much the same as a keylogger.


Mouzi's Avatar
Member
0 0

I meant that I am good at PHP and JavaScript, but I haven't coded much in real programming languages other than C++ and Python a little.

And the platform is windows.