Because you never order it to move the mouse to the coords that it finds the DTM at so the UpText is never 'knife'
Also note that ClickMouse and MoveMouse are detectable in RS,
instead i suggest using Mouse and MMouse as they are not detectable.
This is how I would do it (I added comments hope it helps
)
SCAR Code:
procedure MakeShafts;
var
x, y: integer;
begin
Knife := DTMFromString('78DA631465606010664001A5B939609A11C A6' +
'79402126C0C688011558D2C90E020A0460048C81250C30B24 6408' +
'A8E106128AF8D500007531024F');
Log := DTMFromString('78DA631461606010604001C591A6609A11C A6' +
'7940112AC0C688011550D1790E020A0860548881050C30724 6409' +
'A89100129204D428020931026A40F6F0E2570300C2020245' );
if FindDTM(Knife, x, y, 542, 186, 732, 465) then
begin //if DTM is found then..
MMouse(x, y, 0, 0); //will move mouse to coords
if (IsUpText('Knife')) then Mouse(x, y, 0, 0, true); //if uptext is there it will click
Wait(2000);
end else WriteLn('Knife DTM not found..'); //if DTM is NOT found it will debug this
if FindDTM(Log, x, y, 542, 186, 732, 465) then
begin //if log DTM is found then..
MMouse(x, y, 0, 0); //will move mouse to coords
if (IsUpText('Logs')) then Mouse(x, y, 0, 0, true);
Wait(2000);
end else WriteLn('Log DTM not found..'); //if DTM is NOT found it will debug this
end;