If it takes more than 5 min then don't bother.
I was wondering if someone could make a script that clicks on a color every 10 seconds.
Color:10145331
If it takes more than 5 min then don't bother.
I was wondering if someone could make a script that clicks on a color every 10 seconds.
Color:10145331
Last edited by Cynic; 06-28-2012 at 07:04 PM.
Not a Hex color, find the normal color and I can do it.
why use hex? are you just saying hex to sound smart... if i am not mistaken any color is considered a hex in computer science... do you want to enter the hexadecimal value and have simba convert it to color or do you just simply want to find colors on the screen?
Simba Code:program color;
var
x,y:integer;
begin
findcolor(x,y,111111);
repeat
movemouse(x,y,5,5);
wait(100+random(100));
clickmouse2(x,y,5,5);
wait(20000);
until(false);
end.
//something like this?, i do think clickmouse2 is not properly set up but you /can catch my riff
If it takes more than 5 min then don't bother.
I was wondering if someone could make a script that clicks on a color every 10 seconds.
Color:10145331
This should do the job, you can change the 2000s with x and y dimensions of the screen, respectively.Simba Code:program ColorClick;
var
x, y : Integer;
begin
repeat
if FindColor(x, y, 10145331, 0, 0, 2000, 2000) then
ClickMouse(x, y, mouse_left);
Wait(10000);
until(false)
end;
BTW, you can use a hexadecimal color by putting a @ sign in front of it.
Miner & Urn Crafter & 07 Chicken Killer
SPS BlindWalk Tutorial
Working on: Nothing
teacher in every art, brought the fire that hath proved to mortals a means to mighty ends
well its it very simple... though im not sure simba uses hex by default, what you would have to to is use the built in color chooser with simba and there are very simple functions...
they are
findcolor()
Movemouse()
ClickMouse()
Simba Code:program color;
var
x,y:integer;
begin
findcolor(x,y,10145331,0,0,800,600); // if this color isnt working use the color chooser above
repeat
movemouse(x,y);
clickmouse(x,y,1);
wait(20000); // this is the wait 10 seconds part adjust to your needs
until(false);
end.
in the findcolor function i set the search area to 800 by 600 but u can change that accordingly to suit your preferences...
I think this is what you want, will search for the number by hex (it uses some of wantonman's code)
Simba Code:program color;
Const
Color = ''; //Put the hex of the colour here between the ''
var
x, y, W, H :integer;
Function HexToColor(Hex : String) : integer;
Var
R, G, B : integer;
begin
Result := -1;
if(Length(Hex) <> 6)then
exit;
R := HexToInt(Copy(Hex, 1, 2));
G := HexToInt(Copy(Hex, 3, 2));
B := HexToInt(Copy(Hex, 5, 2));
Result := RGBtoColor(R, G, B);
end;
begin
GetClientDimensions(W, H);
findcolor(x, y, HexToColor(Color), 0, 0, W - 1, H - 1);
repeat
movemouse(x, y);
WriteLn('Clicking mouse at point: '+ToStr(Point(x, y)));
clickmouse(x, y, mouse_Left);
wait(20000); // this is the wait 20 seconds part adjust to your needs (time is in msec)
until(false);
end.
Last edited by putonajonny; 06-29-2012 at 12:39 AM.
lol @ you guise.
Simba Code:program ColourClicker;
const
TheColour = $FFFFFF; // Preceed with dollar sign ($) if in hex format.
var
P, Dimensions: TPoint;
begin
GetClientDimensions(Dimensions.X, Dimensions.Y);
ActivateClient;
repeat
if(FindColor(P.X, P.Y, TheColour, 0, 0, Dimensions.X - 1, Dimensions.Y - 1)) then
begin
MoveMouse(P.X, P.Y);
ClickMouse(P.X, P.Y, mouse_Left);
Sleep(10000);
end;
Until(IsKeyDown(VK_F2));
end.
Wrote in web browser, but should work.![]()
Last edited by Daniel; 07-02-2012 at 06:08 AM.
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 |
There are currently 1 users browsing this thread. (0 members and 1 guests)