SRL Archive - OSR Help

P07_DidRedClick Help


BigRedJapan

2013-02-28 15:30:47

Its not working!

Repeat
Log;
Until(P07_DidRedClick);


Any Suggestions! Please!

tealc

2013-02-28 15:35:06

what does log do? Does the log procedure end immediately after it clicks without any waits?

BigRedJapan

2013-02-28 15:37:06

it supposed to but it just redo's the log again and again!

Its supposed to stop after it clicks red!

tealc

2013-02-28 15:42:12

Could you post your code for log?

BigRedJapan

2013-02-28 15:46:44

Compiled successfully in 1108 ms.
Checking P07Include VersionNumber
Local : 1.7 / Latest : 1.7
You Have The Latest Version of P07Include
Walking Log
Walking Log
Walking Log
Successfully executed.

tealc

2013-02-28 15:49:59

i meant post your code for the procedure named log. The one that you call in your script.

BigRedJapan

2013-02-28 15:54:57

procedure Log;
begin
P07_MakeCompassNorth;
P07_MakeCameraAngleHigh;
logcol := 538974 Writeln('Walking Log');
if P07_FindObjCustom(x, y, ['Walk', 'lk-acr', 'Log', 'og bal'], [logcol, 540007, 534854], 3) then
begin
ClickMouse2(mouse_left);
wait(randomrange(100, 200));
end;
end;

tealc

2013-02-28 15:59:33

The P07_DidRedClick only works if the red is still on the screen. You have the wait between clicking and checking for the red.

procedure Log;
begin
P07_MakeCompassNorth;
P07_MakeCameraAngleHigh;
logcol := 538974 Writeln('Walking Log');
if P07_FindObjCustom(x, y, ['Walk', 'lk-acr', 'Log', 'og bal'], [logcol, 540007, 534854], 3) then
begin
wait(randomrange(100, 200));
ClickMouse2(mouse_left);
end;
end;

try this i switched clickmouse2 and wait

BigRedJapan

2013-02-28 16:01:24

thats not the problem it clicks i just need it to make sure it clicks before it continues!

So it sees a red click then it continues the script!

tealc

2013-02-28 16:12:49

because you wait between clicking and looking for red click. The red disappears before you can call p07_didredclick.


Also p07_didredclick might be unnecessary because findobjcustom should click on the log everytime.