LUALoriotPro WEB site

LoriotPro scripting documentation
Extensions for LUA language

Table of contents Search function

Print the current page Mail this  link UTUBE Channel version française

lp.GetChildUID - Get the child items of a directory item

childnumber = lp.GetChildUID(uid,"arrayname");

Description

Collect all the UID of the child objects of a LoriotPro directory object. This function is convenient to browse the directory for object information.

Parameters

uid - A 64 bits value in a character string format that identify the father object in the directory tree

"arrayname" - A name assigned to the array that will collect the returned values

Return Values

1 if child(s) exist, else nil if error.

arrayname['number'] - The number of child objects for this father object
arrayname['UIDx'] - The UID of the childs in character string format.

if array.number = 2
arrayname[‘UID0’] = UID of the first child
arrayname[‘UID1’] = UID of the second child

Example

lp_value = 0;
lp_buffer ="error";
dofile(lp.GetPath().."/config/script/loriotinit.lua");
if lp.GetIPInformation(lp_host,"a") ~= nil then
if lp.GetChildUID(a.UID,"aaa") ~= nil then
for i=0 , aaa.number-1 do
lp.Trace(aaa["UID"..i]);
if lp.GetUIDInformation(aaa["UID"..i],"aa") ~= nil then
lp.Trace("plugin name =",aa.plugin_name,aa.name,aa.string);
end
end
end
end



www.loriotpro.com