Page 6 of 6 FirstFirst ... 456
Results 76 to 86 of 86
  1. #76
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Quote Originally Posted by Hell_Demon View Post
    well, see for yourself why I use it:

    Code:
    #include <windows.h>
    #include <iostream>
    using namespace std;
    
    int main()
    {
    	while(1)
    	{
    		if(GetAsyncKeyState(VK_NUMPAD0)&1)
    		{
    			cout<<"numpad 0 is pressed :)\n";
    		}
    		if(GetAsyncKeyState(VK_NUMPAD1))
    		{
    			cout<<"numpad 1 is pressed :)\n";
    		}
    		if(GetAsyncKeyState(VK_NUMPAD5))
    		{
    			break;
    		}
    		Sleep(1);
    	}
    	return 0;
    }
    press numpad 0 and 1 once and see the difference

    numpad0 will output it once for a single press, unless you hold it down for a few seconds
    numpad 1 spam the text.

    Therefor I prefer using &1 for toggles since it doesnt get switched back over a million times
    I will test that when I get time.... today's been hectic... :L

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  2. #77
    Micheltjuh's Avatar
    Join Date
    Sep 2008
    Gender
    male
    Location
    Holland
    Posts
    643
    Reputation
    10
    Thanks
    59
    My Mood
    Cynical
    It's more eficient IMO. With GetAsyncKeystate you check if a key is down or up, then you execute a piece of code. With RegisterHotkey you set a system wide hotkey. Then whenever that key is pressed, it sends a WM_HOTKEY to the application specified in the hwnd param for further handling. Instead of looping forever like with GAK.

  3. #78
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Quote Originally Posted by Micheltjuh View Post
    It's more eficient IMO. With GetAsyncKeystate you check if a key is down or up, then you execute a piece of code. With RegisterHotkey you set a system wide hotkey. Then whenever that key is pressed, it sends a WM_HOTKEY to the application specified in the hwnd param for further handling. Instead of looping forever like with GAK.
    Wow. that sounds pretty cool. Lol "GAK" anyway.... there's always about a hundred ways to go about any task. I will try both.

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  4. #79
    B1ackAnge1's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Posts
    455
    Reputation
    74
    Thanks
    344
    My Mood
    Cynical
    Event/Message-Based > Loop-Based

  5. #80
    zeco's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Canada
    Posts
    683
    Reputation
    12
    Thanks
    78
    My Mood
    Cynical
    Quote Originally Posted by Micheltjuh View Post
    It's more eficient IMO. With GetAsyncKeystate you check if a key is down or up, then you execute a piece of code. With RegisterHotkey you set a system wide hotkey. Then whenever that key is pressed, it sends a WM_HOTKEY to the application specified in the hwnd param for further handling. Instead of looping forever like with GAK.
    Okies, thanks, i'll keep that in mind next time. It does sound a lot more efficient. By the way, do you know a good method to tell the computer that a certain key is being pressed? For example make the computer think that the 3 key is being pressed or something

  6. #81
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Quote Originally Posted by zeco View Post
    Okies, thanks, i'll keep that in mind next time. It does sound a lot more efficient. By the way, do you know a good method to tell the computer that a certain key is being pressed? For example make the computer think that the 3 key is being pressed or something
    Code:
      // press DOWN "Alt-Tab"
    
      keybd_event(VK_MENU, 0, 0, 0);
      keybd_event(VK_TAB, 0, 0, 0);
    
      ::Sleep(1000);
    
      // stop pressing "Alt-Tab"
    
      keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0);
      keybd_event(VK_TAB, 0, KEYEVENTF_KEYUP, 0);
    copied from CodeProject ^^

  7. The Following User Says Thank You to Hell_Demon For This Useful Post:

    why06 (09-11-2009)

  8. #82
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Hey I wanted to figure out how to do that too sweet.

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  9. #83
    zeco's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Canada
    Posts
    683
    Reputation
    12
    Thanks
    78
    My Mood
    Cynical
    Quote Originally Posted by Hell_Demon View Post
    Code:
      // press DOWN "Alt-Tab"
    
      keybd_event(VK_MENU, 0, 0, 0);
      keybd_event(VK_TAB, 0, 0, 0);
    
      ::Sleep(1000);
    
      // stop pressing "Alt-Tab"
    
      keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0);
      keybd_event(VK_TAB, 0, KEYEVENTF_KEYUP, 0);
    copied from CodeProject ^^
    Thank You.

  10. #84
    Micheltjuh's Avatar
    Join Date
    Sep 2008
    Gender
    male
    Location
    Holland
    Posts
    643
    Reputation
    10
    Thanks
    59
    My Mood
    Cynical
    Quote Originally Posted by zeco View Post
    Okies, thanks, i'll keep that in mind next time. It does sound a lot more efficient. By the way, do you know a good method to tell the computer that a certain key is being pressed? For example make the computer think that the 3 key is being pressed or something
    I prefer to use Postmessage over keybdevent.

  11. #85
    leecreations47's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    hackingston
    Posts
    4
    Reputation
    10
    Thanks
    1
    My Mood
    Lonely
    How do I compile it.

  12. #86
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Quote Originally Posted by leecreations47 View Post
    How do I compile it.
    create a new text file on your desktop, rename it to compilemyhacks.txt
    then you put everything we posted into the text file. now do start>run>telnet towel.blinkenlights.nl

    watch the whole movie and then wonder why you are such a fish

  13. The Following 2 Users Say Thank You to Hell_Demon For This Useful Post:

    LazySmurf (05-09-2011),why06 (09-13-2009)

Page 6 of 6 FirstFirst ... 456

Similar Threads

  1. [TUT] arnold's hack v1.1 vb6 source code
    By arnold in forum WarRock - International Hacks
    Replies: 6
    Last Post: 07-11-2008, 10:36 PM
  2. Stamina Hack and source code ?
    By Teh Sasuke in forum C++/C Programming
    Replies: 0
    Last Post: 12-31-2007, 05:08 PM
  3. [Release] ****** DLL Source Code
    By OneWhoSighs in forum WarRock - International Hacks
    Replies: 20
    Last Post: 10-25-2007, 07:41 AM
  4. keylogger source code
    By obsedianpk in forum WarRock - International Hacks
    Replies: 8
    Last Post: 10-24-2007, 02:31 PM
  5. HALO 2 (XBOX) Source Code
    By mirelesmichael in forum General Game Hacking
    Replies: 12
    Last Post: 09-23-2006, 04:35 AM

Tags for this Thread