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???
{************************************************* ******************************
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???