Results 1 to 15 of 19

Threaded View

  1. #8
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,470
    Reputation
    564
    Thanks
    6,168
    My Mood
    Psychedelic
    Before I respond....look at this meme.
    It describes my face atm.



    Now:

    Quote Originally Posted by Lovroman View Post
    Code:
    if(GetAsyncKeyState(VK_CONTROL) & GetAsyncKeyState(VK_ENTER) & 0x8000) 
    {
    
    }

    Code:
    if((GetAsyncKeyState(VK_XXX)&8000) && (GetAsyncKeyState(VK_YYY)&8000)) //If you're planning on holding both simultaneously for 8 seconds.
    {
    
    }
    You don't add the & 8000 unless you're planning to hold the second key down for 8 seconds for it to execute once.
    Quote Originally Posted by Lovroman View Post
    0x8000 is always same.


    GetAsyncKeyState(KeyCode) returns an unsigned integer in milliseconds of how long ago the key specified was LAST pressed. The "&" code performs a bitwise AND operation with the return value. Basically it's used to say "If XXX Is Pressed For X Milliseconds"

    You should never use "& 8000" as execution time will wait till it's held down for 8 seconds. (I generally used &1 for 1 millisecond.)

    Also, pointing out "&&" and "&" have different meanings.

    & -> Bitwise Operator AND
    && -> Conditional Operator AND

    Quote Originally Posted by BCxSocial(B) View Post
    ok That's the Value and its Wrong -_- Value of VK_UP is 0x26


    Quote Originally Posted by Lovroman View Post
    "Is key is pressed".
    inb4readabove
    Last edited by Kenshin13; 09-03-2013 at 01:05 AM.

Similar Threads

  1. [Help] Map a button to a functional key [F1, F2, F3 ....etc] {Visual Basic}
    By odaysawaqed in forum Call of Duty Black Ops 2 Coding, Programming & Source Code
    Replies: 3
    Last Post: 07-25-2013, 05:37 PM
  2. [Request] Request to use " Function Keys " for casting / using skills.
    By kroem in forum Dragon Nest Discussions
    Replies: 8
    Last Post: 04-10-2013, 09:36 PM
  3. Replies: 3
    Last Post: 12-07-2012, 10:31 AM
  4. [WTS] Selling over 50+ Legit Arma 2 Operation Arrowhead CD KEYS ( I replace invalid etc)
    By iberdy in forum DayZ Selling / Trading / Buying
    Replies: 3
    Last Post: 12-03-2012, 02:20 PM
  5. function keys
    By lilcreeplil in forum WarRock Hack Source Code
    Replies: 3
    Last Post: 01-14-2011, 06:42 AM