Results 1 to 3 of 3

Thread: Pressing two keys simultaneously.

  1. #1
    Join Date
    Mar 2006
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Pressing two keys simultaneously.

    I would like to press (and hold) the right arrow key for ten seconds, and while it is being held, I would like scar to 'press' the down arrow key.

    I have tried using the SendArrowWait command, and making it hold the button down for 10 seconds, then I used SendArrowWait(0, 2000), however I realised that this only makes SCAR press the right arrow (for 10 sec) then after 10 secs, it proceeds to press the down arrow for 2 seconds.

    Can anyone tell me how I would go about solving this problem.

  2. #2
    Join Date
    Oct 2006
    Location
    I'm also from Michigan!
    Posts
    563
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    use keyDown and KeyUp

    SCAR Code:
    keyDown(VK_RIGHT);
    wait(500+random(500));
    keyDown(VK_DOWN);
    wait(2000+random(1000));
    keyUp(VK_DOWN);
    wait(6000+random(1000));
    keyUp(VK_RIGHT);
    believe thatll do what you want.

  3. #3
    Join Date
    Mar 2006
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That's exactly what I wanted! Thanks

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need help with key pressing and if else statments
    By Sean[714] in forum OSR Help
    Replies: 48
    Last Post: 01-12-2009, 09:51 PM
  2. Replies: 5
    Last Post: 12-09-2007, 10:20 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
  •