Adblock breaks this site

need help with using repeat

Discussion in 'Scar/Simba Help' started by K!LL3R, Sep 16, 2007.

  1. K!LL3R

    K!LL3R Member

    Joined:
    Jan 31, 2007
    Posts:
    54
    Referrals:
    0
    Sythe Gold:
    0
    need help with using repeat

    ok im new to scar sorta and this is my script
    Code:
    const
     text = 'hello';//this is what it will type
    procedure move;
    begin
    repeat
     begin
      if(IsFKeyDown(8)) then;
       sendkeys(text)
     end;
    begin
     move;
    end.
    
    and i want it to do like everytime i press F8 it says that but all it does is gives me and error or just typed the text then quits
     
  2. Town

    Town Grand Master
    Scar Programmers

    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5
    need help with using repeat

    Code:
    const
     text = 'hello';//this is what it will type
    procedure move;
    begin
    repeat
     begin
      if(IsFKeyDown(8)) then;
       sendkeys(text)
     end;
    until (false); // every repeat must have an until just like every begin must have an end, whatever is in parenthesis must be a boolean, when that boolean is true it will stop repeat, "false", like it is now, will repeat forever
    end; // ends the procedure
    
    begin
     move;
    end.
     
  3. K!LL3R

    K!LL3R Member

    Joined:
    Jan 31, 2007
    Posts:
    54
    Referrals:
    0
    Sythe Gold:
    0
    need help with using repeat

    hah i knew it was something then false sheesh i used to know this stuff and thanks man EDIT: oh and also now it just says hello for like ever and i cant get it so that when i press f8 it says it
     
  4. Town

    Town Grand Master
    Scar Programmers

    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5
    need help with using repeat

    It only says it when the F8 key is down, you should probably add a wait, though.
     
  5. K!LL3R

    K!LL3R Member

    Joined:
    Jan 31, 2007
    Posts:
    54
    Referrals:
    0
    Sythe Gold:
    0
    need help with using repeat

    no it doesnt do it only when the F8 key is down it does it right when i start the script
     
  6. Town

    Town Grand Master
    Scar Programmers

    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5
    need help with using repeat

    Take the semi-colon off of 'then'.
     
< question about scar | I need help with few things on scar >


 
 
Adblock breaks this site