Log in

View Full Version : Need help with DTM



gsquare567
03-17-2007, 04:04 AM
im thinking of making a new dtm for the function:

{************************************************* ******************************
function PopUp(Option: String): Boolean;
By: RsN
Description: Finds Popup menu, then clicks Option.
************************************************** *****************************}

function PopUp(Option: string): Boolean;
var
Top, Bottom: TPoint;
dtmTop, dtmBottom, x, y: Integer;
begin
dtmTop := DTMFromString('78DA63146464606801622C0026CA2800643 5A' +
'3AA890D7147552345841A90393D04D4880259DD04D4880359 ED04' +
'D4280059AD04FC2504644DC4AF06000DC909E0');
dtmBottom := DTMFromString('78DA635CCCC8C070198891406C883B98868 93' +
'22E02B22EA1AA8101B89A8540D64522CCB948843984EC02B9 F910' +
'01BBA610E1AF6944D80572F311026AE6005967F0DB05007BD 4134' +
'5');
if (FindDTM(dtmTop, Top.x, Top.y, 10, 10, 764, 502) and FindDTM(dtmBottom,
Bottom.x, Bottom.y, Top.x, Top.y, 764, 502)) then
if (FindText(x, y, Option, upchars, 0, 0, Bottom.x, Bottom.y)) then
begin
Result := True;
Mouse(x + Length(Option) * 3, y + 2, 4, 3, True);
Wait(150 + Random(200));
end else
if (FindText(x, y, 'Cancel', upchars, Top.x, Top.y, Bottom.x, Bottom.y))
then
Mouse(x + 3, y + 2, 4, 3, True);
FreeDTM(dtmTop);
FreeDTM(dtmBottom);
end;

because it doesnt work perfectly for me, it only gets it right 50% of the time. my only questions are where to begin? i know how to make a dtm but what parts do i make the dtm??? can sum1 plz help maybe post a pic to show me? also, whats Top, Bottom: TPoint;
whats a tpoint???

Mjordan
03-17-2007, 04:07 AM
what do you mean "what parts do i make the dtm"? You make a mother point, then like 5 more points(if thats what your asking). and if you dont know that, then you dont know how to make a DTM. i suggest checking out some tuts, there are alot of good ones on DTM's

gsquare567
03-17-2007, 02:16 PM
dtmTop := DTMFromString('78DA63146464606801622C0026CA2800643 5A' +
'3AA890D7147552345841A90393D04D4880259DD04D4880359 ED04' +
'D4280059AD04FC2504644DC4AF06000DC909E0');
dtmBottom := DTMFromString('78DA635CCCC8C070198891406C883B98868 93' +
'22E02B22EA1AA8101B89A8540D64522CCB948843984EC02B9 F910' +
'01BBA610E1AF6944D80572F311026AE6005967F0DB05007BD 4134' +
'5');
im wondering why he has 2 dtms, thats all. and you didnt touch on my other question: what is a TPoint?