« on: November 10, 2016, 11:51:15 PM »
0
function GetBod(Shop: String; Debug: String):Integer;
var
list2 : TStringList;
UserList : TStringList;
i : integer;
x : integer;
text : String;
begin
ClearShopList;
ClearContextMenu;
FindDistance:= 3;
FindVertical:= 3;
list2 := TStringList.Create;
FindType($0190,Ground);
wait(100);
UserList := TStringList.Create;
GetFindedList(UserList);
for i:= 0 to UserList.count -1 do
begin
text := GetTooltip(StrToInt('$'+UserList));
if Debug = 'True' then
begin
FillNewWindow('Chars around: ' + text+ ' $' + UserList);
end;
if (pos(Shop, text)>0) and (pos('guildmaster', text)=0) then
begin
if Debug = 'True' then
begin
FillNewWindow('My Shop found at: ' + InttoStr(i));
end;
ClearContextMenu;
RequestContextMenu(StrtoInt('$'+UserList));
wait(1000);
GetContextMenu(list2);
for x:= 0 to list2.count-1 do
begin
if Debug = 'True' then
begin
FillNewWindow('Shops ContextMenue: ' + list2
end;
if (pos('Bulk Order Info', list2
begin
if Debug = 'True' then
begin
FillNewWindow('Shops ContextMenue entry at: ' + InttoStr(x));
end;
SetContextMenuHook(StrToInt('$'+UserList), x);
wait(1000);
end;
ClearShopList;
end;
ClearContextMenu;
end;
end;
UserList.free;
list2.free;
Result := 1;
end;SetContextMenuHook(StrToInt('$'+UserList), x); do not work every time.can you explain me?
« Last Edit: November 10, 2016, 11:53:15 PM by epsilon2 »

Logged