function GetTheProcessList()
local T = {}
local SL=createStringlist()
getProcesslist(SL)
for i=0,strings_getCount(SL)-1 do
T[i] = strings_getString(SL,i)
end
return T
end
function GetPros(sender)
local PL = GetTheProcessList()
local S = {}
local variable = drop.text
list.Clear()
for x = 0, #PL do
if variable == "All" then
list.Items.Add(PL[x])
else
if string.sub(PL[x],10) == variable then
list.Items.Add(PL[x])
end
end
end
end
function OpenPro()
local a = list.ItemIndex
if a ~= -1 then
local b = string.sub(list.Items[a],0,8)
b = tonumber(b,16)
openProcess(b)
else
print("Nothing")
end
end
-- demo form creation, skip if using custom form
if fo then fo.destroy() end
fo = createForm() -- CETrainer
fo.Height = 50
fo.Width = 400
fo.Position = poScreenCenter
drop = createComboBox(fo) -- CETrainer.CEComboBox1
drop.Width = fo.Width
drop.Top = (fo.Height-drop.Height)/2
drop.Text = "All"
drop.Font = getLuaEngine().mScript.Font -- make monospace based on lua engine script's font
drop.ReadOnly = true
-- end of demo form creation
drop.Items.clear()
getProcesslist(drop.Items)
drop.OnChange = function(sender)
local proc = sender.Items[sender.ItemIndex]
local idString, name = proc:match('(%x+)%-(%w+)')
local id = tonumber(idString,16)
openProcess(id)
end
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum