Results 1 to 11 of 11

Thread: What's IsKeyDown in C++ and how do I use it?

  1. #1
    Join Date
    Apr 2007
    Location
    Finland
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  2. #2
    Join Date
    Jun 2007
    Location
    I'm Omnipresent...
    Posts
    90
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by PwNZoRNooB View Post
    Title says it all
    GetChar () ?
    ~ "To Alcohol, The Cause and Solution to all of Life's Problems"

    http://img.photobucket.com/albums/v4...Untitled-1.png

  3. #3
    Join Date
    Apr 2007
    Location
    Finland
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  4. #4
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    use the GetASyncState API

  5. #5
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Freddy knows everything?!
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  6. #6
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    Yea, pretty much

  7. #7
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  8. #8
    Join Date
    Dec 2006
    Posts
    374
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you should do someting like this:
    Code:
      
    
    void begin() 
    {
    if (GetAsyncKeyState(VK_MENU)) //VK_MENU means alt
    		{
    			if (GetAsyncKeyState('K')) // what ever the command here! 
                            if (GetAsyncKeyState('P')) // this would be activated if u pushed alt+p  
           } 
    }
    i think thats right.. im just learning c,c++ so yea
    Another awsome scripting forum! Check it out: www.Uberbroproductions.net/forums
    TRY MY VARROCK ZAMMY MAGE CURSER/CONFUSER/WEAKENER! THE LINK IS BELOW
    http://www.srl-forums.com/forum/varr...56.html?t=6356
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~


  9. #9
    Join Date
    Aug 2007
    Location
    NJ, USA
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    GetAsyncKeyState loops are rather slow, I recommend setting a global windows keyboard hook, so that your program is notified whenever a key is pressed. This way, you don't eat up CPU with an infinite loop. Here is the MSDN for the SetWindowsHookEx API that you need to use: http://msdn2.microsoft.com/en-us/library/ms644990.aspx. Use the WH_KEYBOARD_LL hook type.

  10. #10
    Join Date
    Jan 2007
    Location
    Kansas
    Posts
    3,760
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    I'm sorry but I am going to have to report you PwNZoRNooB, if you look 2 topics down this question has been asked and answered.

    NOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOB
    You, PwNZoRNooB, have been reported for being a NOOB.
    Your
    Current violations include
    1. Not Searching for
    This brings you to a new total of (3) Noob Points!

    For more information on PwNZoRNooB please go Here.

    For more information from This database please go Here.

    For more information on The Noob Points System please go Here.

    For more information on Noobs please go Here.

    NOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOB


    Please remember next time to use the search button.


  11. #11
    Join Date
    Apr 2007
    Location
    Finland
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The 2 topics down guy asked 08-06-2007, 10:01 PM
    and I asked 06-18-2007, 11:13 PM. Erm
    And yes I tried to search it by going through the whole C/C++ section (like 12 topics back then)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Cases with IsKeyDown?
    By Sandstorm in forum OSR Help
    Replies: 4
    Last Post: 11-16-2008, 06:13 PM
  2. IsKeyDown
    By 666d3v1l666 in forum OSR Help
    Replies: 6
    Last Post: 08-29-2008, 11:34 AM
  3. iskeydown - need help
    By l33t_h4x0r in forum OSR Help
    Replies: 5
    Last Post: 12-16-2007, 11:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •