Aegis
2011-12-10 21:09:58
I'm trying to light two incense burners. For now, I've been using a cheap alternative method, but I'd like to "upgrade" the accuracy of it. With this, I can get them to eventually be clicked, but it's not smooth/stable at all. Here's some needed info:
What I'm trying to use:
I have this placed within a loop until ChooseOption('Light'), so that's why I have it set to right-click. If this is a problem, I could easily change it. So, right now, this either repeatedly jumps inbetween the two burners, right clicks them and does nothing, right-clicks the same one several times, or it actually lights the burner. Also, I kinda rushed into whole concept of TPAs, so I might just not be correctly/effectively using them.
As stated before, I can eventually get them lit, but it looks terrible. Once this step is perfected, I'll be posting the script. Any help and insight is much appreciated, thanks.
- I need to click two objects (that look exactly the same)
- Only click them once
- ONLY The uptext changes once it's clicked; the object stays the same (that's how I know it's been lit)
What I'm trying to use:
procedure RightClickBurner;
var
InsTPA : TPointArray;
InsPoint : TPoint;
x, y, i : Integer;
begin
x := MSCx;
y := MSCy;
FindColorsSpiralTolerance(x, y, InsTPA, 2409460, MSx1, MSy1, MSx2, MSy2, 10);
if Length(InsTPA) = 0 then
Exit;
for i := 0 to 1 do
begin
InsPoint := InsTPA[i];
MMouse (InsPoint.x, InsPoint.y, 0, 0);
if (IsUpTextMultiCustom(['Inc','se bu','ner'])) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False); //Right-clicks because I loop until ChooseOption('Light')
Wait(500 + Random(500));
end;
end;
end; I have this placed within a loop until ChooseOption('Light'), so that's why I have it set to right-click. If this is a problem, I could easily change it. So, right now, this either repeatedly jumps inbetween the two burners, right clicks them and does nothing, right-clicks the same one several times, or it actually lights the burner. Also, I kinda rushed into whole concept of TPAs, so I might just not be correctly/effectively using them.
As stated before, I can eventually get them lit, but it looks terrible. Once this step is perfected, I'll be posting the script. Any help and insight is much appreciated, thanks.