Question [C++] EggoBot sending keyclicks situation? menu

User Tag List

Results 1 to 2 of 2
  1. #1
    Jevan1000's Avatar Active Member
    Reputation
    17
    Join Date
    May 2012
    Posts
    48
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question [C++] EggoBot sending keyclicks situation?

    Hello, I'm not entirely sure if this is the correct section to post this question so please move me if it is. Recently I have released a fishing bot in the 'World of Warcraft Bot" section, some users are saying the bot is working but not casting the fishing line, essentially its not sending the keystroke '1' for some and others it works. Maybe someone could take a look at my code and give me some suggestions as to why this is happening thanks! It's very confusing because its working perfectly for me and some users but others its just not sending the keystroke, my thought is maybe international keyboards could have some effect on this?

    my function in which the key to press is sent to:

    Code:
    SendText("1", hwnd);
    Code:
    void SendText(string text, HWND hwnd)
    {
    	for (int i = 0; i < text.length(); i++)
    	{
    		char c = toupper(text[i]);
    		static_cast<int>(c);
    		PressKey(c, 0, hwnd);
    	}
    }
    Code:
    void PressKey(WORD key, int x, HWND hwnd)
    {
    	int y = 0;
    	while (y <= x)
    	{
    		SetForegroundWindow(hwnd);
    		Sleep(50 + rand() % 100);
    
    		INPUT *keyClick;
    		keyClick = new INPUT;
    		keyClick->ki.wVk = key;
    		keyClick->type = INPUT_KEYBOARD;
    		keyClick->ki.dwFlags = 0;
    		keyClick->ki.time = 0;
    		keyClick->ki.wScan = 0;
    		keyClick->ki.dwExtraInfo = 0;
    
    
    		SendInput(1, keyClick, sizeof(INPUT));
    
    		Sleep(50);
    
    		keyClick->ki.dwFlags = KEYEVENTF_KEYUP;
    
    		SendInput(1, keyClick, sizeof(INPUT));
    		y++;
    	}
    }

    Question [C++] EggoBot sending keyclicks situation?
  2. #2
    Sychotix's Avatar Moderator Authenticator enabled
    Reputation
    1421
    Join Date
    Apr 2006
    Posts
    3,943
    Thanks G/R
    285/572
    Trade Feedback
    1 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jevan1000 View Post
    Hello, I'm not entirely sure if this is the correct section to post this question so please move me if it is. Recently I have released a fishing bot in the 'World of Warcraft Bot" section, some users are saying the bot is working but not casting the fishing line, essentially its not sending the keystroke '1' for some and others it works. Maybe someone could take a look at my code and give me some suggestions as to why this is happening thanks! It's very confusing because its working perfectly for me and some users but others its just not sending the keystroke, my thought is maybe international keyboards could have some effect on this?

    my function in which the key to press is sent to:

    Code:
    SendText("1", hwnd);
    Code:
    void SendText(string text, HWND hwnd)
    {
    	for (int i = 0; i < text.length(); i++)
    	{
    		char c = toupper(text[i]);
    		static_cast<int>(c);
    		PressKey(c, 0, hwnd);
    	}
    }
    Code:
    void PressKey(WORD key, int x, HWND hwnd)
    {
    	int y = 0;
    	while (y <= x)
    	{
    		SetForegroundWindow(hwnd);
    		Sleep(50 + rand() % 100);
    
    		INPUT *keyClick;
    		keyClick = new INPUT;
    		keyClick->ki.wVk = key;
    		keyClick->type = INPUT_KEYBOARD;
    		keyClick->ki.dwFlags = 0;
    		keyClick->ki.time = 0;
    		keyClick->ki.wScan = 0;
    		keyClick->ki.dwExtraInfo = 0;
    
    
    		SendInput(1, keyClick, sizeof(INPUT));
    
    		Sleep(50);
    
    		keyClick->ki.dwFlags = KEYEVENTF_KEYUP;
    
    		SendInput(1, keyClick, sizeof(INPUT));
    		y++;
    	}
    }
    Are you sure that the way you are handling the vkey code will work on all systems? You may need to use something like VkKeyScanExA function | Microsoft Docs (or there may be a better solution, try googling more than I just did)

Similar Threads

  1. [Question] Sending a packet
    By IceFire32 in forum WoW Memory Editing
    Replies: 7
    Last Post: 06-13-2010, 03:43 PM
  2. [Question] Send money with paypal without a bank or VCC/CC
    By PublicEnemy219 in forum WoW Scams Help
    Replies: 2
    Last Post: 02-09-2009, 12:59 AM
  3. Replies: 5
    Last Post: 01-17-2009, 07:02 AM
  4. [Question] How to send massive files
    By NUBCAKE in forum Community Chat
    Replies: 1
    Last Post: 10-31-2008, 06:01 PM
  5. [Question] Send Keys to Window
    By TuFF in forum Programming
    Replies: 4
    Last Post: 10-09-2008, 05:55 PM
All times are GMT -5. The time now is 11:49 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search