Results 1 to 6 of 6

Thread: Why isn't SCAR pressing any key down when I'm telling it to?

  1. #1
    Join Date
    Aug 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Why isn't SCAR pressing any key down when I'm telling it to?

    I've been around the forums for some time, and not long ago I decided to learn more about using SCAR, and I like making scripts for games just laying out on the internet, but I have a problem, I have two procedures, one for shooting the men, and one for reloading (the game is called "Storm the House 2"), and I have a writeln for both, kind of a proggy, which tells that the procedure does indeed start, but the only thing it's for, reloading, doesn't work, the problem is that it appears not to be pressing space although that's what I've written it to do.

    Here's the whole script, hope you can help

    SCAR Code:
    program StormTheHouse2;

    var
    x,y,c,fc: Integer;

    const
    SwordmanHeadColor= 16777215;

    procedure ShootSwordman;
    begin
    fc:=7
    c:=fc
    repeat
     if(FindColor(x,y,SwordmanHeadColor,0,0,650,450)) then
      begin
       clickmouse(x,y,true);
       wait(100);
       c:=c-1
       writeln(inttostr(c) + ' bullets left');
      end;
    until(c=0)
    end;

    procedure Reload;
    begin
     writeln('Reload');
     wait(100);
     SendKeys(chr(32));
     wait(2000);
     c:=fc
    end;

    begin
    repeat
     ShootSwordman;
     Reload;
    until(false);
    end.

  2. #2
    Join Date
    Aug 2007
    Location
    Emo-land
    Posts
    1,109
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well CHR(32) is enter! You said you wanted space?! So find what space is. Alos you may need an activate client, not sure, but try it if everything else fails. Good luck.

    Edit: Vry sorry lmao 13 is enter. I guess 32 is space. I tested using typesend... which presses enter after, so I thought that it was only pressing enter. Oops! Yeah, so try out activate client. Don't hold your breath

  3. #3
    Join Date
    Aug 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Whats' activate client?
    And yeah, I saw that the first post was one looooong sentence, sry if it was a little unorganized

    Anyone else got any help?

  4. #4
    Join Date
    Mar 2007
    Posts
    478
    Mentioned
    4 Post(s)
    Quoted
    4 Post(s)

    Default

    I have one give me a sec.

    EDIT:Try this put what you want in the ()
    TypeSend( );
    Back from the dead.....

  5. #5
    Join Date
    Aug 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Tried TypeSend and it worked, thanks

    But can anyone tell me exactly why TypeSend worked and SendKeys did not?
    I even tried ActivateClient, but it still didn't work, if that's of any help

  6. #6
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Sometimes sendkeys just doesn't register.
    I do visit every 2-6 months

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. what noobs being telling lies..
    By randy marsh in forum The Bashing Club / BBQ Pit
    Replies: 10
    Last Post: 01-20-2009, 09:04 PM
  2. 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
  3. Replies: 3
    Last Post: 01-25-2008, 08:46 AM

Posting Permissions

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