Página 1 de 1
Tree Menu expend and Save all To Data to Text
Publicado: 12 Nov 2012 19:18
por pavel
I want some thing like :
Treemenu expend and all items of data will be save in a textfile.txt
my textMenu is like this :
Pavel
Anik
Akib
etcc.....
And It will be save as txt line by line.
Is it possible with JamTreeList Object Plugin ?
Thanks
Re: Tree Menu expend and Save all To Data to Text
Publicado: 12 Nov 2012 20:20
por rafaxplayer
usas jamtreelist o el objeto tree de ams?
Re: Tree Menu expend and Save all To Data to Text
Publicado: 13 Nov 2012 18:40
por pavel
Yes . or any tree list items expend and save it to a txt file. Is it possible ?
Re: Tree Menu expend and Save all To Data to Text
Publicado: 13 Nov 2012 19:54
por Ceone
Re: Tree Menu expend and Save all To Data to Text
Publicado: 13 Nov 2012 20:37
por rafaxplayer
Ese ejemplo es muy mejorable
Re: Tree Menu expend and Save all To Data to Text
Publicado: 14 Nov 2012 14:24
por abood1987
thanks Ceone
Re: Tree Menu expend and Save all To Data to Text
Publicado: 16 Nov 2012 22:33
por rafaxplayer
Esta funcion te crea un string con todos los nodes:
--------------------------- Function TreeToText--------------------------
-- Args: --
-- TreeName: The Name of Tree Object. --
--------------------------------------------------------------------------
function TreeToText(TreeName)
TreeName = TreeName or "Tree1";
local a= 0;
local b;
txt="";
function node(t)
local k;
local c;
local NodeIn;
if type(t)=='table'then
for x = 1,#t do
strNodeIndex=t[x].NodeIndex;
k = Tree.GetChildren(TreeName,strNodeIndex);
txt = txt..t[x].Text.."\r\n";
if k then
txt=node(k);
end
end
return txt;
end
end
repeat
b = Tree.GetChildren(TreeName,tostring(a));
if b then
txt=node(b);
break;
end
until b==nil;
return txt;
end
Debug.ShowWindow(true);
Debug.Print(TreeToText("Tree1"));
Re: Tree Menu expend and Save all To Data to Text
Publicado: 17 Nov 2012 11:31
por pavel
Thanks a lot that is this what i am really looking for thanks a lot thanks.
Re: Tree Menu expend and Save all To Data to Text
Publicado: 17 Nov 2012 15:00
por rafaxplayer
para eso estamos...