Search Results

Search found 2 results on 1 pages for 'user302131'.

Page 1/1 | 1 

  • Keybd is not working right =(

    - by user302131
    i can't get this to work right this should press left for 1sec then wait 10secs then right 1sec. keybd_event(0x25, 0xCB, 0, 0); // press left cout << "Ldown\n"; // so i know it worked Sleep(1000); // hold it for 1sec keybd_event(0x25, 0xCB, KEYEVENTF_KEYUP, 0);// let go of the key cout << "Lup\n"; // so i know i let go Sleep(10000); // Sleep for 10secs keybd_event(0x27, 0xCD, 0, 0); // press right cout << "Rdown\n"; // so i know i pressed right Sleep(1000); // sleep 1sec keybd_event(0x27, 0xCD, KEYEVENTF_KEYUP, 0);// let go of the key cout << "Rdown\n"; // so i know i let go. this is in a loop but it wont do anything :( unless i close the program before the key is let go then it will just keep the keydown until i press the key again. i know you can use only one key code if you want but i need to use both. so what i'm i missing?

    Read the article

  • keybd_event is not working right =(

    - by user302131
    I can't get this to work right. This should press left for 1 second then wait 10 seconds, then right 1 second, etc.: keybd_event(0x25, 0xCB, 0, 0); // press left cout << "Ldown\n"; // so i know it worked Sleep(1000); // hold it for 1sec keybd_event(0x25, 0xCB, KEYEVENTF_KEYUP, 0);// let go of the key cout << "Lup\n"; // so i know i let go Sleep(10000); // Sleep for 10secs keybd_event(0x27, 0xCD, 0, 0); // press right cout << "Rdown\n"; // so i know i pressed right Sleep(1000); // sleep 1sec keybd_event(0x27, 0xCD, KEYEVENTF_KEYUP, 0);// let go of the key cout << "Rdown\n"; // so i know i let go. This is in a loop but it wont do anything :( Unless I close the program before the key is let go, then it will just keep the key down until I press the key again. I know you can use only one key code if you want but I need to use both. So what am I missing?

    Read the article

1