Results 1 to 9 of 9

Thread: holding keys

  1. #1
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default holding keys

    im making a script for stick rpg al i need to know is how to hold the d key i no how to send it and btw im useing send keys and all that because i dont think you can get banned frm stick rpg

  2. #2
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

  3. #3
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thank you very much

    *EDIT*
    it holds it down once then waits 9 seconds i need it to hold it down for 9 seconds

  4. #4
    Join Date
    Dec 2006
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    KeyDown(68);//push 'd' down
    Wait(9000);//wait for 9 seconds
    KeyUp(68);//release 'd' key

  5. #5
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thats excatly wat i put in but it didnt work it pressed it once then waits 9 seconds then finishes the script.
    and also how do i make it click off scar when i press play and go onto the the stcick rpg screen

  6. #6
    Join Date
    Dec 2006
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    var
     StartTime : Integer;

    begin
      MarkTime(StartTime);
      repeat
        SendKeys('D');
      until(TimeFromMark(StartTime) >= 9000)
    end.
    that does the trick, however, it takes quite a while to compile because of SRL... you could put the MarkTime() and TimeFromMark() functions into your script, then you wouldn't need to include SRL...

  7. #7
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    kk ty ill give this a that works but it keeps typeing d in the scar screen and when i go into stick rpg and press ctrl alt r it dont work is there a procedure to makes it minimize scar when u press the green start button

  8. #8
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    SCAR Code:
    program New;
    var
      StartTime :integer;
     
     begin
      ActivateClient;
      MarkTime(StartTime);
       repeat
        SendKey('d');
       until(TimeFromMark(StartTime) >=9000)
      end.

    pick the rpg screen with the clietn crosshiars and the
    SCAR Code:
    ActivateClient;
    function makes that screen pop ontop and the script runs on it
    STOP PM'ING ME

  9. #9
    Join Date
    Jun 2006
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    or just use SendKeysSilent :P

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with holding keys down
    By shadohead in forum OSR Help
    Replies: 5
    Last Post: 01-29-2009, 09:08 AM
  2. Help With Holding Keys Down
    By shadohead in forum OSR Help
    Replies: 2
    Last Post: 01-28-2009, 07:49 AM
  3. VK Keys?
    By Macro_FTW in forum OSR Help
    Replies: 1
    Last Post: 11-12-2008, 04:22 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
  •