C++ samp auto payday.

Fritoss

New member
Joined
Jan 24, 2019
Messages
2
Reaction score
0
Hello everyone! Basically, I'm new with c++ and programming, but I managed to create a program, that's open RakSAMPClient at XX:59 logins and wait for payday, after payday it close RakSAMPClient and waits for next payday. Everything sounds good, but it's uncomfortable because you can't use your mouse when the process is started, basically when the clock hits XX:59 you can't do anything else, just wait.
for example in my code I used
C++:
mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
and
C++:
    POINT cursorPos;
                HWND handle = FindWindowA(NULL, "payday");

                ScreenToClient(handle, &cursorPos);

                int x, y;

                x = cursorPos.x;
                y = cursorPos.y;

                int Rx = 1353;
                int Ry = 447;


                SetCursorPos(Rx, Ry);
so I can hit the "OK" button and same for password input. So what I'm asking, is it possible to make all actions in the background without using a mouse?
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,486
Reaction score
227
Location
( ͡° ͜ʖ ͡°)
What do you mean that it wont work? You mean that you can't do it?

I think a easy way would be to just to use a Virtual Desktop and run it there. idk blabla
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
What opy said is better, do it inside raksamp, you can catch/respond to samp dialog events programatically.
 
Top