SRL Archive - OSR Help

FindColorTolerance... Help?


_Magical_

2013-03-02 13:49:09

Hi,

Can someone tell me why this won't work? It Executes it successfully but nothing happens. According to this, it should move the mouse to a black area on the Notepad.



Any help would be appreciated.
Thanks :spongebob:

Le Jingle

2013-03-02 13:59:58

You should call the procedure in the script's main

Ex.

//..code above this ..
begin
SetupSRL;
cookie;
end.

blockay

2013-03-02 14:13:10

From: Le Jingle
You should call the procedure in the script's main

Ex.

//..code above this ..
begin
SetupSRL;
cookie;
end.

ya, you just need to call the procedure in your main loop

_Magical_

2013-03-04 08:35:54

Thanks :D

EDIT: Now it moves the cursor really slowly :S How do I change that? :P

Sjoe

2013-03-04 09:06:27

From: _Magical_
Thanks :D

EDIT: Now it moves the cursor really slowly :S How do I change that? :P


Don't know if it'll help. Call MouseSpeed := 20; after SetupSRL;

_Magical_

2013-03-04 09:16:47

From: Sjoekeloe
Don't know if it'll help. Call MouseSpeed := 20; after SetupSRL;

Doesn't work :V Sorry

gerauchert

2013-03-04 10:35:58

Well, the higher you set MouseSpeed, the faster the mouse will move… so I don't know why it wouldn't make it work for you.

I just tested it using the screenshot on your first post:


program new;
{$i srl/srl.simba}
var
x,y: Integer;
begin
SetupSRL;
MouseSpeed := 30;
//MouseSpeed := 10; Slower...
if FindColorTolerance(x,y,0,60,450,200,570,0) then //coordinates via my browser
MMouse(x,y,5,5);
end.

_Magical_

2013-03-04 11:08:11

Oh well, Since I'm making a bot for an RSPS the mouse speed won't really matter. ;) Thanks for your help, all the same.