-
Posts
10 -
Cadastrado em
-
Última visita
Reputação
3-
isvkt alterou sua foto pessoal
-
my program is simple and makes the mouse move automatically at certain angles, but it moves in a very robotic way, I would like to make the movement more humanized, how can I do that? while (true) { for (int i = 0; i < 6; ++i) { if (GetAsyncKeyState(gun_keys[i]) && (gun != guns[i])) { gun = guns[i]; system("cls"); cout << "Weapon:\t" << gun->name << "\nShots:\t" << gun->len << "\nVelocity:\t" << gun->rpm << "\n\n\n"; gun_delay = GetTime(gun->rpm); gun_index = 0; break; } } if (GetAsyncKeyState(MOUSEEVENTF_MOVE) < 0) { if (!is_mouse_down) { is_mouse_down = true; if (gun != nullptr) gun_index = 0; } if (gun != nullptr && gun_index != gun->len) { mouse_event(MOUSEEVENTF_MOVE, long(gun->pattner[gun_index][0] * K), long(gun->pattner[gun_index][1] * K), 0, 0); ++gun_index; Sleep(gun_delay); continue; } } else is_mouse_down = false; Sleep(150); } return 0; }
-
my code is simple, it just makes the mouse move down but it moves automatically, i want it to move when i press the ''VK_LBUTTON'' key I tried to put ''if(GetKeyState(VK_LBUTTON)'' but it is closing when I open int main(void) { if (!mouse_open()) { printf("[-] failed\n"); return 0; } for (int i = 0; i < 32; i++) { Sleep(100); printf("[+] moving mouse\n"); mouse_move(0, -10, 0, 0); } mouse_close(); }
-
my program works through the console, when opening the cmd screen appears and I would like to make this screen appear and disappear on the INSERT key
-
what would it look like in my code? while (true) { for(int i = 0; i < 5; ++i) { if (GetAsyncKeyState(gun_key[i]) && (gun != guns[i])) { gun = guns[i]; system("cls"); cout << "Weapon:\t" << gun->name << "\nShots:\t" << gun->len << "\nVelocity:\t" << gun->rpm << "\n\n\n"; gun_delay = GetTime(gun->rpm); gun_index = 0; break; } } if (GetAsyncKeyState(VK_LBUTTON) < 0) { if (!is_mouse_down) { is_mouse_down = true; if (gun != nullptr) gun_index = 0; } if (gun != nullptr && gun_index != gun->len) { mouse_event(MOUSEEVENTF_MOVE, long(gun->pattner[gun_index][0] * K), long(gun->pattner[gun_index][1] * K), 0, 0); ++gun_index; Sleep(gun_delay); continue; } } else is_mouse_down = false; Sleep(150); } return 0; }
-
Gostaria de pausar o meu programa na tecla 0x32, 0x33, 0x34 e fazer voltar a funcionar na tecla 0x31
-
my program simulates some mouse movements, but the cmd screen remains open, I would like to put a key to appear and disappear from the screen, and another key for it to close completely
-
I did but it was not cool, how did you leave the code?
-
I'm coding a C++ program that makes a certain movement with the mouse by itself when I press the left mouse button, it has F1, F2, F3 keys and each key has a different movement, and then I press the left mouse button to execute that movement , but what is happening is that I have to hold down the F1 key and the left mouse button at the same time for it to work, I wanted to press the F1 key just once and then just hold down the left mouse button ! while (true) { if (GetAsyncKeyState(VK_F1)) { ExecControl(*ak47); } if (GetAsyncKeyState(VK_F2)) { ExecControl(*m4a4); } if (GetAsyncKeyState(VK_F3)) { ExecControl(*m4a1s); } if (GetAsyncKeyState(VK_F4)) { ExecControl(*ump45); } if (GetAsyncKeyState(VK_F5)) { ExecControl(*famas); } Sleep(150); } return 0; } void ExecControl(weapon_t gun) { system("cls"); cout <<"Weapon:\t" << gun.name <<"\nShots:\t" << gun.len << "\nVelocity:\t" << gun.rpm << "\n\n\n"; DWORD delay = GetTime(gun.rpm); int index = 0; while (GetAsyncKeyState(VK_LBUTTON) && index != gun.len) { mouse_event(MOUSEEVENTF_MOVE, long(gun.pattner [index][0] * K), long(gun.pattner[index][1] * K), 0, 0); index++; Sleep(delay); } index = 0; }
Sobre o Clube do Hardware
No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais
Direitos autorais
Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais