I have simba but Where do I put it? In the scar folder? and how woul this look typed out if i used that as a color ignore my previous line with those coordinates.
ok i got it to move the mouse there but it wont click. Also How would i make this loop unless i hit "F8"
Last edited by omgbeans; 01-09-2011 at 09:52 PM.
I already gave you exact example:
Simba Code:program Color;
{$I SRL/SRL.scar}
var x, y: Integer;
begin
SetupSRL;
if FindColor(x, y, 2041538, 0, 0, 1200, 300) then begin
Writeln('Found color!');
Mouse(x, y, 1, 1);
end else begin
Writeln('Warning, color not found!');
end;
FreeSRL;
end.
There used to be something meaningful here.
ok well thanks for the help so far then
Why can't you just use some coords to click the button?
You simply have to download simba, install it, and enable/update the extensions Frement instructed you to. After that, run his script. If this does not work tell us clearly why it doesn't or where it got stuck.
I have simba but theres no instructions where to install it. I looked at view and opened extensions and its blank.
This works in scar and keeps running until i hit F8 but it wont keep clicking the color.
program Colour;
var
x, y : integer;
begin
If FindColor(x, y, 1781462, 604, 63, 1276, 776) Then
begin
writeln('Found colour');
movemouse(x, y);
wait (1000);
clickmouse(x, y, true);
repeat;
until isFKeyDown (8);
end;
end.
Code:program Colour; var x, y : integer; begin If FindColor(x, y, 1781462, 604, 63, 1276, 776) Then Repeat begin writeln('Found colour'); movemouse(x, y); wait (1000); clickmouse(x, y, true); until isFKeyDown (8); end; end.
that doesnt work in SCAR.
I downloaded and installed Simba and I get this error now
when using this code[Error] (11:22): Invalid number of parameters at line 10
program Color;
{$I SRL/SRL.scar}
var x, y: Integer;
begin
SetupSRL;
if FindColor(x, y, 1781462, 604, 63, 1276, 776) then begin
Writeln('Found color!');
Mouse(x, y, 1, 1);
end else begin
Writeln('Warning, color not found!');
end;
FreeSRL;
end.
Do begin repeat if findcolor begin
IN SIMBA!
this doesnt work in simba eitherprogram Colour;
var
x, y : integer;
begin
If FindColor(x, y, 1781462, 604, 63, 1276, 776) Then
Repeat
begin
writeln('Found colour');
movemouse(x, y);
wait (1000);
clickmouse(x, y, true);
until isFKeyDown (8);
end;
end.
it says this line is wrong[Error] (21:23): Type mismatch at line 20
clickmouse(x, y, true);
Last edited by omgbeans; 01-09-2011 at 10:57 PM.
For simba
Simba Code:program Colour;
var
x, y : integer;
begin
If FindColor(x, y, 1781462, 604, 63, 1276, 776) Then
Repeat
begin
writeln('Found colour');
movemouse(x, y);
wait (1000);
clickmouse(x, y, 0);
end;
until IsKeyDown(119);//isFkeyDown(8) in simba
end.
SCAR Code:IsKeyDown(119);
while not IsKeyDown(199) do
begin
if FindColor(x, y, 1781462, 604, 63, 1276, 776) then
begin
WriteLn('Found color!');
MoveMouse(X, Y);
Wait(100);
HoldMouse(X, Y, True);
Wait(100);
ReleaseMouse(X, Y, True);
end;
end;
thanks
it gives me an error on this line
and is this how its suppose to look?[Error] (14:26): Type mismatch at line 13
program Colour;
var
x, y : integer;
begin
IsKeyDown(119);
while not IsKeyDown(199) do
begin
if FindColor(x, y, 1781462, 604, 63, 1276, 776) then
begin
WriteLn('Found color!');
MoveMouse(X, Y);
Wait(100);
HoldMouse(X, Y, True);
Wait(100);
ReleaseMouse(X, Y, True);
end;
end;
end.
You're using simba now? Then replace "True" in HoldMouse() and ReleaseMouse() with "mouse_Left"
Simba Code:program Colour;
var
x, y: integer;
begin
repeat
if (FindColor(x, y, 1781462, 604, 63, 1276, 776)) Then
begin
WriteLn('Found Colour!');
MoveMouse(x, y);
Wait(1000);
HoldMouse(x, y, mouse_Left);
Wait(100);
ReleaseMouse(x, y, mouse_Left);
end;
until (IsKeyDown(VK_F8));
end.
Last edited by Dgby714; 01-10-2011 at 12:33 AM.
now it wont find the color anymore after running the script over and over
You could try FindColorTolerance?
There used to be something meaningful here.
Simba Code:program Colour;
var
I, x, y: integer;
begin
repeat
for I := 0 to 10 do
if (FindColorTolerance(x, y, 1781462, 604, 63, 1276, 776, I)) Then
begin
WriteLn('Found Colour!');
MoveMouse(x, y);
Wait(1000);
ClickMouse(x, y, mouse_Left);
end;
until (IsKeyDown(VK_F8));
end.
Not everything needs spoon feeding Dgby![]()
There used to be something meaningful here.
Ok that seems to fix the issue of pressing the button as well as finding the color. What does the 1 through 10 mean just the tolerance level? Like 10 is more intensive?
Last edited by omgbeans; 01-10-2011 at 01:33 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)