Код
--lua
local function returnhandle (value)
var = {}
for i = 1, #value do
table.insert (var,value[i][1][1]) -- value what i need, it contains process id
end
return var
end
arr = {findwindow ('name1'), findwindow ('name2')} -- windows to search with individual names
group = returnhandle (arr)
log (table.concat(group, " "))
how to avoid to get error "attempt to index nil value", i mean more what check i need to do, to not try table.insert nil value, i get such error if window name is typed incorrect and value is nil