Shatterhand
2014-10-06 13:07:06
Hi. I am trying to make a debug procedure which would list all the widgets in a hierarchical order.
Example
What I have so far, is not working.
I have done this in my own java client, I am not sure I could do it with SMART's limited functions too.
Help is much appreciated. :)
Example
widget[429][1] name= text=Friends List - World 310
widget[429][2] name= text= quantity=0
widget[429][2][0] name= text=What I have so far, is not working.
procedure DebugWidgets;
var
WidgetPointer, Pointer, Size1, Size2, i, j : Integer;
begin
Size1 := SmartGetFieldArraySize(SmartCurrentTarget, 0, hook_client_widgets, 0);
Writeln(IntToStr(Size1)); //output: 594
for i:=0 to Size1 do
begin
Pointer := SmartGetFieldArrayObject(SmartCurrentTarget, 0, hook_client_widgets, i);
Size2 := SmartGetFieldArraySize(SmartCurrentTarget, Pointer, '', 0); //Error: Exception: Access violation at line 968
Writeln(IntToStr(Size2));
//for j:=0 to Size2 do
//begin
//WidgetPointer := SmartGetFieldArray2DObject(SmartCurrentTarget, 0, hook_client_widgets, i, j);
//WRITELN PART AND GETTING SUBCHILDREN
//end;
end;
end;I have done this in my own java client, I am not sure I could do it with SMART's limited functions too.
Help is much appreciated. :)