Log in

View Full Version : How to change to SRL5 on rightclick?



laakerules
01-15-2012, 04:53 PM
Hey, just noticed that my script wont right click anymore. And i know that its from the srl5 update. how do i update my script to allow it?

Here is my procedure for finding and picking up bones.


Function BoneFinder(Colors: TIntegerArray; TheUpText: TStringArray; midx, midy: integer): Boolean;
Var
T,i,X,Y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
Begin
MarkTime(T);
Repeat
SetArrayLength(ATPA, Length(Colors));
for i := 0 to High(Colors) do
FindColorsSpiralTolerance(midx, midy, ATPA[i], Colors[i], MSX1, MSY1, MSX2, MSY2, 5);
TPA := MergeATPA(ATPA);
ATPA := TPAtoATPAEx(TPA, 15, 15);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
if (Length(ATPA) = 0) then
Exit;

MiddleTPAEx(ATPA[0], x, y);

if (TimeFromMark(T) > 5000) then
Exit;

MMouse(x, y, 10, 10);
Wait(randomrange(10,15));
If(IsUpTextMultiCustom(TheUpText)) then
begin
ClickMouse2(False);
WaitOption('ones', 50);
if DidRedClick then
begin
Result := True;
Break;
end;
end;
Until(Result)
end;

Wizzup?
01-15-2012, 04:56 PM
You should not use ClickMouse2. Use SRL's Mouse(). The proper arguments are here: http://docs.villavu.com/simba/scriptref/mouseandkeyboard.html#types

Mark
01-15-2012, 04:56 PM
change this
ClickMouse2(False);
to this
ClickMouse2(Mouse_Right);

Hmm i thought moving the MMouse with MouseClick2 after it was safe?


I use MMouse after i find a DTM check uptext then use MouseClick2 to click it

as to using Mouse(x,y,0,0,Mouse_Left); is there much difference.

laakerules
01-15-2012, 05:06 PM
Ok,switched it up to use SRL's mouse because the Clickmouse2(mouse_right); didnt work and now it wont even right click.

Mark
01-15-2012, 05:09 PM
check out the link wizzup sent you
shows you valid arguments

laakerules
01-15-2012, 05:17 PM
I tried that, and it doesnt work. Just hovers over it, it wont click it.

Dynamite
01-15-2012, 05:24 PM
Then your uptext isn't resulting.

-Boom

laakerules
01-15-2012, 05:30 PM
I found out that the error is in my Chooseoption('ones');

But still dont know how to fix it.