Results 1 to 8 of 8

Thread: Choose ChatBox Option Help.

  1. #1
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default Choose ChatBox Option Help.

    Hello SRL-ians. I have a question about choosing options which appear inside the Runescape chatbox, like so:

    How would I get a script to click on the option? It there an SRL procedure I can use, or would I need to attempt something more complicated?

    Thanks,
    Keepbotting
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Just click it with coordinates.
    Search for the color of the outline of the clay down there to detect if has appeared.
    Then just use coordinates with randomness of liek 10, 10 (like just use Mouse)

  3. #3
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    Just click it with coordinates.
    Search for the color of the outline of the clay down there to detect if has appeared.
    Then just use coordinates with randomness of liek 10, 10 (like just use Mouse)
    You mean a FindObj procedure? I thought FindObj only searches in the mainscreen.
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  4. #4
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Noooo.
    Get the color picker.
    Pick any point of the black outline of the clay down there.
    Then

    Simba Code:
    If WaitColor(x, y, Color, Tol, MaxTime); Then
    Mouse(32490324, 329034, 5, 5, True)

    Color of outline should be 131072, tolerance can be 0, max time can be like 5000, the x and y is where you picked.

    And the first 2 parameters for the mouse function should just be coordinates for the center of the button you want to click.

  5. #5
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Find the text in the chat box.. or whatever co-ordinates..
    Simba Code:
    {$I SRL/SRL.Simba}

    Function ChatBoxOption(Text: string): Boolean;
    var
      STR: String;
      X, Y: Integer;
    begin
      writeln(GetTextAtExWrap(MCX1, MCY1, MCX2, MCY2, 0, 5, 2, 2070783, 20, 'StatChars'));
      Result:= FindText(X, Y, Text, 'StatChars', MCX1, MCY1, MCX2, MCY2);
      if Result then
        MMouse(X, Y, 0, 0);
    end;


    begin
      SetupSRL;
      ChatBoxOption('clay');
    end.
    I am Ggzz..
    Hackintosher

  6. #6
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    Noooo.
    Get the color picker.
    Pick any point of the black outline of the clay down there.
    Then

    Simba Code:
    If WaitColor(x, y, Color, Tol, MaxTime); Then
    Mouse(32490324, 329034, 5, 5, True)

    Color of outline should be 131072, tolerance can be 0, max time can be like 5000, the x and y is where you picked.

    And the first 2 parameters for the mouse function should just be coordinates for the center of the button you want to click.
    Wait...I'm confused. Where do I get the X and Y co-ordinates?
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  7. #7
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    Drag the crosshairs to the SMART window and just hover your mouse over the option.
    Then look onn the bottom left of the SRL window and you'll see the coords.

  8. #8
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by S1N View Post
    Drag the crosshairs to the SMART window and just hover your mouse over the option.
    Then look onn the bottom left of the SRL window and you'll see the coords.
    Ohhh, THOSE coords! Thanks ;D :noobface:
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

Thread Information

Users Browsing this Thread

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

Posting Permissions

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