andreyefgs
Advanced Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
Код: function getindex(t, v) for i = 1, #t do if t[i] == v then return i end end return 0 end local n = {} local f = {} local list = "" far.RecursiveSearch("C:\\Users\\andrey\\Dropbox\\backup\\doc\\sublime_files\\templates\\zip", "*.zip", function(item, fullpath) if fullpath ~= nil then local name = fullpath:gsub("^.*\92([^\92]+\46zip)$", "%1") table.insert(n, name) table.insert(f, fullpath) list = list .. name .. "\n" end end, far.Flags.FRS_RECUR) local r = Menu.Show(list, "Templates", nil, 0) if r then local i = getindex(n, r) if f[i] then local cmd = "C:\\U\\7zip\\7z.exe e " .. f[i] panel.SetCmdLine(nil, cmd) Keys "Enter" end end |
|