Alright
Simba Code:
If findDTM(MSWord, X, Y, MSX1, MSY1, MCX2, MSY2) Then
Begin
WriteIn('You clicked Microsoft Word!');
MMouse(x, y, 7, 7);
Mouse(x, y, 0 , 0, True);
x and y need to be X, Y in your mouse functions. Also your trying to find Microsoft Word, your not using Runescape at all. MSX1, MSY1, MCX2, and MSY2 are all runescape coordinates of stuff. XS, XE, YS, YE... XS, XE is the top left of the box you want to start searching from ( imagine it as the top left corner of a box ) YS, YE is the bottom right corner of the box.
Simba Code:
FindDTM(MSWord, X, Y, XS, XE, YS, YE); // Something like this is the original function prototype
Try this code instead
Simba Code:
var
w, h, X, Y: Integer;
SetClientAsDesktop; // So if your screen is 1024x728 that would be the
// max width and height of your desktop
GetClientDimensions(w, h); // To get the width and height of the client
// which is the desktop
If FindDTM(MSWord, X, Y, 0, 0, w - 1, h - 1) Then
Begin
WriteIn('You clicked Microsoft Word!');
MMouse(X, Y, 7, 7);
// Changed x, y to X, Y
Mouse(X, Y, 0 , 0, True);