A
A13594
Guest
Hi. I am kind of new to SCAR but I have created simple scripts with the function of FindDTM. It worked great. But today, I made a script with FindDTM and realized that it wasn't storing the mouse coordinates to x and y.
Example: Here is a simple script that doesn't work for me:
Now when I run the script, it does check to see if it can find the DTM but when it does find it, it moves the mouse totally to the left side of the screen, outside of the client instead of where it found the DTM.
Why isn't that simple script working??
Helpful info:
- It IS finding the DTM, just not moving the mouse to the right location.
- It used to store the coordinates into x and y until today.
- The DTM is perfectly fine.
Example: Here is a simple script that doesn't work for me:
Code:
program Test;
{.include SRL\SRL.Scar}
var
x,y: Integer;
Test: Integer;
procedure TestDTM;
begin
Test := DTMFromString('78DA6354656260F06740017F0E406846289F5' +
'102530D0CC0D5C803D5441050A308541346408D1A116A0C816A02' +
'09A85106AA7123A04607A8C61DBF1A00214D0580');
If(FindDTM(x,y,Test,0,0,1000,1000)) then
begin
MMouse(x,y,0,0);
Writeln('Test DTM found.');
end else
begin
Writeln('Test DTM not found.');
end;
end;
begin
SetUpSRL;
TestDTM;
end.
Now when I run the script, it does check to see if it can find the DTM but when it does find it, it moves the mouse totally to the left side of the screen, outside of the client instead of where it found the DTM.
Why isn't that simple script working??
Helpful info:
- It IS finding the DTM, just not moving the mouse to the right location.
- It used to store the coordinates into x and y until today.
- The DTM is perfectly fine.

