View Full Version : Choose ChatBox Option Help.
KeepBotting
02-02-2012, 12:25 AM
Hello SRL-ians. I have a question about choosing options which appear inside the Runescape chatbox, like so:
http://i1196.photobucket.com/albums/aa413/PsychoScapeRSPS/clay.png
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
YoHoJo
02-02-2012, 12:27 AM
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)
KeepBotting
02-02-2012, 12:28 AM
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.
YoHoJo
02-02-2012, 12:38 AM
Noooo.
Get the color picker.
Pick any point of the black outline of the clay down there.
Then
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.
Brandon
02-02-2012, 12:50 AM
Find the text in the chat box.. or whatever co-ordinates..
{$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.
KeepBotting
02-02-2012, 12:51 AM
Noooo.
Get the color picker.
Pick any point of the black outline of the clay down there.
Then
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?
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.
KeepBotting
02-02-2012, 12:57 AM
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:
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.