View Full Version : Accurate Clicking
Sirenia
05-14-2012, 06:37 AM
So guys im trying to make a script that will pick some Swap Toads for EPIC profit :P Ive completed most of the script but im struggling with the clicking part... You see those scumbag frogs are very tiny and Mouse will missclick them by clicking outside of the object.procedure PickToads;
var
Waited, X, Y: integer;
begin
if FindColorSpiralTolerance(X, Y, ToadColor, MSX1, MSY1, MSX2, MSY2, 5) then
begin
Mouse(X, Y, 0, 0, true);
Wait(350 + random(200));
repeat
Wait(100 + random(100));
Inc(Waited);
until(CustomFlag) or (Waited = 30)
end;
end;
Tell me what im doing wrong and suggest how it would work better.
x[Warrior]x3500
05-14-2012, 06:40 AM
well you are clicking exactly where you have found the color. so if it isnt clickin on the object, then your color is incorrect.
If this is the case then I suggest you left - click and select an option.
Sirenia
05-14-2012, 06:46 AM
If this is the case then I suggest you left - click and select an option.
Ive tried that too and I still have the same problem :/
@Randomguy posting that Im using wrong colors: Ive used autocolor for the toads and checked tons of times that its only finding the toads t_t
Increase your Mouse speed to about 45 - which three times the normal speed that SetUpSRL will set it to.
Do this by calling:
MouseSpeed := 45
Before you start your function.
Sirenia
05-14-2012, 06:51 AM
Increase your Mouse speed to about 45 - which three times the normal speed that SetUpSRL will set it to.
Do this by calling:
MouseSpeed := 45
Before you start your function.
Thanks ill test that :) How fast is the mouse @45 ? I did MoveMouse(X, Y); and ClickMouse(X, Y, 1); and it worked a little better
Thanks ill test that :) How fast is the mouse @45 ? I did MoveMouse(X, Y); and ClickMouse(X, Y, 1); and it worked a little better
By default, the Mouse speed is 15, so 45 will be three times faster than how it normally is.
You can increase it more and more if you want till you get it fast enough :p
Sirenia
05-14-2012, 06:55 AM
By default, the Mouse speed is 15, so 45 will be three times faster than how it normally is.
By the way, shouldnt FindColorSpiralTolerance click in the middle of the object? Still it feels like its trying to click at the top left corner :/ I recall you have to use something like mscx and mscy?
By the way, shouldnt FindColorSpiralTolerance click in the middle of the object? Still it feels like its trying to click at the top left corner :/ I recall you have to use something like mscx and mscy?
That means it will start searching from the Main Screen Center, however, this doesn't affect where it clicks. It will return the co-ordinates of the first point it finds the colour - so it won't always click in the middle of the object, just where it finds the colour first.
Sirenia
05-14-2012, 07:01 AM
That means it will start searching from the Main Screen Center, however, this doesn't affect where it clicks. It will return the co-ordinates of the first point it finds the colour - so it won't always click in the middle of the object, just where it finds the colour first.
Would FindObjTPA try to click in the middle or am I screwed there too?
Would FindObjTPA try to click in the middle or am I screwed there too?
That might work, you could use that to MiddleTPAEx (Finds middle point) and then click...
Sirenia
05-14-2012, 07:03 AM
That might work, you could use that to MiddleTPAEx (Finds middle point) and then click...
Thanks for the super valueable suggestions abu, I will test that :)
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.