Page 1 of 1

Make sure gump is opened

Posted: 01.11.2013 9:14
by mixers
if dead then
begin
repeat
waitgump('1')
wait(100);
until ?***********?
end;

until what ?

Re: Make sure gump is opened

Posted: 01.11.2013 11:41
by nah nah
IsGump ?
GetGumpsCount ?

Code: Select all

if dead then begin
    while not isgump do
        wait(100);
    waitgump('1');
end;

Re: Make sure gump is opened

Posted: 01.11.2013 13:25
by mixers
i want use getgumpinfo, until some word show in gumpinfo

Re: Make sure gump is opened

Posted: 01.11.2013 15:02
by Vizit0r
word - in what part of gumpinfo?

Re: Make sure gump is opened

Posted: 03.11.2013 8:43
by mixers
1.JPG
1.JPG (27.73 KiB) Viewed 12455 times
2.JPG
2.JPG (17.86 KiB) Viewed 12455 times
until some words show in text lines or Released_ID = 1210

Re: Make sure gump is opened

Posted: 03.11.2013 18:25
by Vizit0r
this gump info nor for this gump.

For you really need seach in stringlist, filled by GetGumpTextLines.

for example,
if GumpTextStringList.Items.IndexOf(Your_text) > -1 then
....

Re: Make sure gump is opened

Posted: 08.11.2013 23:48
by Crome696
Scan if GumpID exist. GumpId for RessGump will be always the same.

Code: Select all

function GumpExist(GumpType : Cardinal):Boolean;
var
 Index : Word;
 Count : Integer;
begin
 Count := GetGumpsCount() - 1;
 if ( Count > -1 ) then
 begin
  for Index := 0 to Count do
  begin
   if ( GetGumpID(Index) = GumpType ) then
   begin
    Result := True;
    exit;   
   end;
  end;
 end;
 Result := False;
end;
Untested since i just hacked it into this post. But i hope you understand the princip.

Re: Make sure gump is opened

Posted: 10.11.2013 2:56
by mixers
yes, i think i know.

Code: Select all

const currentgump = getgumpscount;
begin
  usbobject(itemid);
  while getgumpscount <= currentgump;
  wait(100);
end;   

Re: Make sure gump is opened

Posted: 10.11.2013 5:54
by Vizit0r

Code: Select all

var currentgump : Integer;
begin
currentgump := getgumpscount;
  usbobject(itemid);
  while getgumpscount <= currentgump;
  wait(100);
end;