Page 1 of 2 12 LastLast
Results 1 to 25 of 28

Thread: Typing in RS

  1. #1
    Join Date
    Aug 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Typing in RS

    I am having trouple getting SCAR to type a message into RS all it will do is type the message where the cursor is currently in SCAR, I have selected the RS window using the crosshair tool but it still types into SCAR. Please Help :P






    program GhostAutoTalker;

    const
    message1='Hello';


    procedure Typer;
    begin
    SendKeys(message1);
    end;


    begin
    repeat
    Typer;
    Wait(5000)
    until(False)
    end.

  2. #2
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well. You need to add ActivateClient; in there.

  3. #3
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    your problem is that you most likely didn't to the crosshair correctly, Pus you don't have activate client. Try putting a wait of about 1000 at the start of your script, and then clicking on the rs window. That should make it type in rs.
    Also, note that a wait(500); is very bannable, and shouldn't be used when you begin making bigger script late on. Make sure to have randomness in there
    wait(5000+random(400));

  4. #4
    Join Date
    Aug 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Great Thanks! ActivateClient; sorted it.

    and thanks for the advice:
    Quote Originally Posted by griff721 View Post
    Also, note that a wait(500); is very bannable, and shouldn't be used when you begin making bigger script late on. Make sure to have randomness in there
    wait(5000+random(400));
    That could've ended in tears :P

  5. #5
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Also Bigger Issue. Use Typesend Not Sendkeys.

    SendKeys Is Instaban!
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  6. #6
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Make it like this:

    SCAR Code:
    program GhostAutoTalker;

    const
      message1='Hello';

    procedure Typer;
    begin
      TypeSend(message1);
    end;

    begin
      ActivateClient;
      repeat
        Typer;
        Wait(3000 + random(2000))
      until(False)
    end.

    Added "ActivateClient", changed "SendKeys" to "TypeSend", and added randomness to your wait time. Now it's much less detectable than what you started with.

    Thanks,
    Richard
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  7. #7
    Join Date
    Aug 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    For some reason TypeSend seems to give me this error:

    Line 15: [Error] (15:1): Unknown identifier 'TypeSend' in script

    Does it mean I'm out of date?

  8. #8
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by GhostofReality View Post
    For some reason TypeSend seems to give me this error:

    Line 15: [Error] (15:1): Unknown identifier 'TypeSend' in script

    Does it mean I'm out of date?
    You'll need to include SRL in your script. Checkout various tutorials that tells you how to setup the Subversion Repository and Including SRL
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  9. #9
    Join Date
    Aug 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok thanks :P I've setup the Subversion Repository but thought that was all that was needed, Didn't realise I had to include SRL in the script... :S

  10. #10
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by GhostofReality View Post
    Ok thanks :P I've setup the Subversion Repository but thought that was all that was needed, Didn't realise I had to include SRL in the script... :S
    That's good then So you know how to include files? If you do, show me an example
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  11. #11
    Join Date
    Aug 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Errrrmmm well...

    no I have no idea how to include files :P

    I'm not even sure what I have done with the Subversion Repository... help!

    if you could help me or point me to a tutorial detailing this I'd be very appreciative.

    *edit* Just seen the Includes tutorial in your signaure... I'll give it a shot.

    *edit2*
    Running through your tutorial and my version wont compile?

    Code:
    Line 8: [Error] (8:34): Type mismatch in script


    Here is what I have

    Code:
    program GhostFindMove;
    
    function FirstFunction: Boolean;
    var x : boolean;
    var y : integer;
    begin
      Repeat
        If(FindColor(x,y,7897473,0,0,600,600)) Then Result:=True;
      Until(result=True);
    end;
    
    Procedure FirstProcedure;
    begin
     FirstFunction;
     MoveMouse(x,y);
     Writeln('Colour Found!');
    end;
    begin
    end.

    I've probably overlooked something silly but I can't find it?

  12. #12
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    SCAR Code:
    If(FindColor(x,y,7897473,0,0,600,600)) Then Result:=True;

    FindColor is a boolean you must never give a value to a boolean, Instead it should be this

    SCAR Code:
    If(FindColor(x,y,7897473,0,0,600,600)) = True Then

    Or an efficienter way

    SCAR Code:
    If(FindColor(x,y,7897473,0,0,600,600)) Then


  13. #13
    Join Date
    Aug 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmm Still giving me the error but my script is wrong, I think, so...

    Thanks though!

  14. #14
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Nope, I can see where you've gone wrong, at least I think I can anyway.

    You've got
    SCAR Code:
    var x : boolean;
    var y : integer;

    But shouldn't both x and y be declared as integers like this:
    SCAR Code:
    var
      x, y : Integer;

    Because Type Mismatch means that you've declared a variable as the wrong sort.

    Example: If I wanted to use FindColor, but accidentally did this:

    SCAR Code:
    program Example;

    var
      x, y : string; // <-- Look here
    begin
      if FindColor(x, y, 123456789, 100, 100, 100, 100) then
        MoveMouse(x, y);
    end.

    then I would get the error
    Code:
    Type Mismatch etc. etc.
    But if were to do this:

    SCAR Code:
    program Example;

    var
      x, y : integer; // <-- Look here again
    begin
      if FindColor(x, y, 123456789, 100, 100, 100, 100) then
        MoveMouse(x, y);
    end.

    then I shouldn't get the error, and the script should run.

    Hope I helped,
    Richard
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  15. #15
    Join Date
    Mar 2007
    Posts
    3,681
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    program GhostFindMove;
    {.include srl/srl.scar}
    function FirstFunction: Boolean;
    var x : boolean;
    var y : integer;
    begin
    Repeat
    If(FindColor(x,y,7897473,0,0,600,600)) Then Result:=True;
    Until(result=True);
    end;

    Procedure FirstProcedure;
    begin
    FirstFunction;
    MoveMouse(x,y);
    Writeln('Colour Found!');
    end;
    begin
    SetupSRL;
    FirstProcedure;
    end.


    or something like that

  16. #16
    Join Date
    Aug 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Now I'm getting an unknown identifier... sorry for all this noobiness and thanks for all of your help :]

    Code:
    program GhostFindMove;
    {.include srl/srl.scar}
    function FirstFunction: Boolean;
    var x, y : integer;
    begin
      Repeat
        If(FindColor(x,y,7897473,0,0,600,600)) Then Result:=True;
      Until(result=True);
    end;
    
    Procedure FirstProcedure;
    begin
     SetupSRL;
      FirstFunction;
       MoveMouse(x,y); //I'm getting unknown identifier for this X now?
        Writeln('Colour Found!');
    end;
    begin
    end.


    *edit* Hugo seems you helped me solve my original Talker script :]

  17. #17
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    program GhostFindMove;
    {.include srl/srl.scar}
    var x, y : integer;
    function FirstFunction: Boolean;
    begin
    Repeat
    If(FindColor(x,y,7897473,0,0,600,600)) Then Result:=True;
    Until(result=True);
    end;

    Procedure FirstProcedure;
    begin
    SetupSRL;
    FirstFunction;
    MoveMouse(x,y); //I'm getting unknown identifier for this X now?
    Writeln('Colour Found!');
    end;
    begin
    end.

    You declared x and y in FirstFunction, then it can only be used in that function.

  18. #18
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thats because x isnt declared globally, or locally in that procedure.

    edit: aww i got beat to it.
    ~ Metagen

  19. #19
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    your next error will be here probably
    SCAR Code:
    Until(result=True);
    //make that
    until result
    ~ Metagen

  20. #20
    Join Date
    Aug 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hurray! Thanks everyone, it works :]

  21. #21
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by Metagen View Post
    your next error will be here probably

    ScarScript:By Drunkenoldma
    </p><p>Until(result=True);</p><p>//make that</p><p>until result</p><p>
    I cant see why thats an error..
    SCAR Code:
    var bool : Boolean;
    begin
      repeat
        Bool := True;
      until(bool=true)
    end.

  22. #22
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by GhostofReality View Post
    *edit* Just seen the Includes tutorial in your signaure... I'll give it a shot.
    That was really a tutorial to create your own includes, however, you could've looked at the section on how to include an include
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  23. #23
    Join Date
    Aug 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh, I just realised I only read the first part about creating a function, and there I am thinking I'm Using Includes and other technical mumbo jumbo :P

    It was very good though

  24. #24
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by GhostofReality View Post
    Oh, I just realised I only read the first part about creating a function, and there I am thinking I'm Using Includes and other technical mumbo jumbo :P

    It was very good though
    Hah, thanks a lot
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  25. #25
    Join Date
    Sep 2008
    Posts
    194
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    His problem is, he is expecting it to type the message when hes not in the runescape window, and you should change your wait type to something like..

    Wait(randomRange(4000,5000))

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. typing
    By sink998 in forum OSR Help
    Replies: 3
    Last Post: 12-06-2008, 06:04 AM
  2. Typing in runescape
    By Dennisjuuh in forum OSR Help
    Replies: 2
    Last Post: 07-17-2008, 01:34 PM
  3. help with typing in script
    By thestathacker in forum OSR Help
    Replies: 2
    Last Post: 04-03-2008, 08:20 PM
  4. Not Typing?
    By Hey321 in forum OSR Help
    Replies: 5
    Last Post: 02-23-2007, 11:01 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
  •