need help with using repeat

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

need help with using repeat
  1. Unread #1 - Sep 16, 2007 at 8:36 PM
  2. K!LL3R
    Joined:
    Jan 31, 2007
    Posts:
    54
    Referrals:
    0
    Sythe Gold:
    0

    K!LL3R Member

    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
     
  3. Unread #2 - Sep 16, 2007 at 9:30 PM
  4. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    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.
     
  5. Unread #3 - Sep 16, 2007 at 9:38 PM
  6. K!LL3R
    Joined:
    Jan 31, 2007
    Posts:
    54
    Referrals:
    0
    Sythe Gold:
    0

    K!LL3R Member

    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
     
  7. Unread #4 - Sep 16, 2007 at 9:49 PM
  8. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    need help with using repeat

    It only says it when the F8 key is down, you should probably add a wait, though.
     
  9. Unread #5 - Sep 17, 2007 at 9:13 AM
  10. K!LL3R
    Joined:
    Jan 31, 2007
    Posts:
    54
    Referrals:
    0
    Sythe Gold:
    0

    K!LL3R Member

    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
     
  11. Unread #6 - Sep 17, 2007 at 2:29 PM
  12. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    need help with using repeat

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

Users viewing this thread
1 guest


 
 
Adblock breaks this site