Jump to content

[C++]Mouse Coor

- - - - -

  • Please log in to reply
No replies to this topic

#1
LogicKills

LogicKills

    Programmer

  • Members
  • PipPipPipPip
  • 139 posts
/*


  Written by LogicKills.

  

  Made this for a friend who was trying

  to make a macro to click a button 

  X amount of times.

  This program is good for providing coordinates

  for whatever you want to click and or manipulate.

  

  Have Fun;

  Remember, head over to logickills.org for more!

  

*/


#include <iostream>

#include <windows.h>


int main()

{

    while(1){

        Sleep(10);

        POINT cursorPos;

        GetCursorPos(&cursorPos);

        float x = 0;

        x = cursorPos.x;

        float y = 0;

        y = cursorPos.y;

        

        system("cls");      \\ If on linux replace w/ system("clear");

        std::cout << "X: ";

        std::cout << x;

        std::cout << "\n";

        std::cout << "Y: ";

        std::cout << y;

        }

                

        return 0;

}


http://logickills.org
Science - Math - Hacking - Tech




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users