AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1257
|
Posted: Tue Jul 20, 2021 4:18 pm Post subject: Filtered Process List (Memory-Filter-WinCaption) Plugins! |
|
|
Many variants have probably been published on this.
I want to add a color to the action list.
There are codes that can be used for different purposes;
Letter - word search code, panel effect etc.
Edit existing code, paste it in ".lua" file and drop it in CE "autorun" folder.
(I'll leave a link at the end of the post for those who still can't. )
Code: | function processListStart()
local Procss = { }
if ProcssForm then ProcssForm.Destroy() ProcssForm=nil end
ProcssForm=createForm()
ProcssForm.Popupmode=0 ProcssForm.Position=poDesktopCenter
ProcssForm.Width=460 ProcssForm.Height=300 ProcssForm.BorderStyle="bsNone"
ProcssForm.Color="0xFFFF00"
ProcssForm.OnMouseDown = function() ProcssForm.DragNow() end
------------
Procss.Pnl1 = createPanel(ProcssForm)
Procss.Pnl1.Left=0 Procss.Pnl1.Top=5 Procss.Pnl1.Height=35 Procss.Pnl1.Width=460
Procss.Pnl1.Color="0x000000" Procss.Pnl1.Font.Color="0xFFFF00" Procss.Pnl1.Font.Size=17
Procss.Pnl1.Font.Style="fsBold"
Procss.Pnl1.Caption='Process List (Memory - Filter - Search)'
Procss.Pnl1.OnMouseDown = function() ProcssForm.DragNow() end
Procss.Pnl2 = createPanel(Procss.Pnl1)
Procss.Pnl2.Left=10 Procss.Pnl2.Top=5 Procss.Pnl2.Height=25 Procss.Pnl2.Width=30
Procss.Pnl2.Color="0xFFFF00" Procss.Pnl2.Font.Color="0x000000" Procss.Pnl2.Font.Size=20
Procss.Pnl2.Font.Style="fsBold" Procss.Pnl2.Caption='--'
Procss.Pnl2.Hint='Minimized' Procss.Pnl2.ShowHint=true
Procss.Pnl3 = createPanel(Procss.Pnl1)
Procss.Pnl3.Left=420 Procss.Pnl3.Top=5 Procss.Pnl3.Height=25 Procss.Pnl3.Width=30
Procss.Pnl3.Color="0xFFFF00" Procss.Pnl3.Font.Color="0x000000" Procss.Pnl3.Font.Size=16
Procss.Pnl3.Font.Style="fsBold" Procss.Pnl3.Caption='X'
Procss.Pnl3.Hint='Close' Procss.Pnl3.ShowHint=true
------------
Procss.Pnl4 = createPanel(ProcssForm)
Procss.Pnl4.Left=0 Procss.Pnl4.Top=45 Procss.Pnl4.Height=250 Procss.Pnl4.Width=460
Procss.Pnl4.Color="0x000000" Procss.Pnl4.Font.Color="0x000000"
Procss.Pnl4.Font.Style="fsBold"
Procss.Pnl4.OnMouseDown = function() ProcssForm.DragNow() end
------------
Procss.Pnl5 = createPanel(Procss.Pnl4)
Procss.Pnl5.Left=10 Procss.Pnl5.Top=8 Procss.Pnl5.Height=25 Procss.Pnl5.Width=215
Procss.Pnl5.Color="0xFFFF00" Procss.Pnl5.Font.Color="0x000000" Procss.Pnl5.Font.Size=14
Procss.Pnl5.Font.Style="fsBold" Procss.Pnl5.Caption='All Process List'
Procss.Pnl5.Hint='Click: To See All Process' Procss.Pnl5.ShowHint=true
Procss.CBox1 = createComboBox(Procss.Pnl4)
Procss.CBox1.Left=235 Procss.CBox1.Height=25 Procss.CBox1.Top=7 Procss.CBox1.Width=215
Procss.CBox1.Font.Size=11 Procss.CBox1.ReadOnly=true Procss.CBox1.Style='csDropDownList'
Procss.Pnl6 = createPanel(Procss.Pnl4)
Procss.Pnl6.Left=10 Procss.Pnl6.Top=217 Procss.Pnl6.Height=25 Procss.Pnl6.Width=100
Procss.Pnl6.Color="0xFFFF00" Procss.Pnl6.Font.Color="0x000000" Procss.Pnl6.Font.Size=12
Procss.Pnl6.Font.Style="fsBold" Procss.Pnl6.Caption='Filter Text'
Procss.Pnl6.Hint='Search for the query in the box' Procss.Pnl6.ShowHint=true
Procss.Edt1 = createEdit(Procss.Pnl4)
Procss.Edt1.AutoSize=false Procss.Edt1.Left=115 Procss.Edt1.Height=25 Procss.Edt1.TextHint='Filter Text?'
Procss.Edt1.Top=217 Procss.Edt1.Width=110 Procss.Edt1.Color="0x80FEBF" Procss.Edt1.Font.Size=12
Procss.Edt1.ShowHint=true Procss.Edt1.Text=""
Procss.Pnl7 = createPanel(Procss.Pnl4)
Procss.Pnl7.Left=370 Procss.Pnl7.Top=217 Procss.Pnl7.Height=25 Procss.Pnl7.Width=80
Procss.Pnl7.Color="0xFFFF00" Procss.Pnl7.Font.Color="0x000000" Procss.Pnl7.Font.Size=13
Procss.Pnl7.Font.Style="fsBold" Procss.Pnl7.Caption='DONATE'
Procss.Pnl7.Hint='If you want to buy me a coffee, use this button.' Procss.Pnl7.ShowHint=true
Procss.Pnl8 = createPanel(Procss.Pnl4)
Procss.Pnl8.Left=235 Procss.Pnl8.Top=217 Procss.Pnl8.Height=25 Procss.Pnl8.Width=130
Procss.Pnl8.Color="0xFFFF00" Procss.Pnl8.Font.Color="0x000000" Procss.Pnl8.Font.Size=9
Procss.Pnl8.Font.Style="fsBold" Procss.Pnl8.Caption='Opened WindowCaption'
Procss.Pnl8.Hint='Click to list the titles of open windows.' Procss.Pnl8.ShowHint=true
Procss.Memo1 = createMemo(Procss.Pnl4)
Procss.Memo1.Left=10 Procss.Memo1.Height=170 Procss.Memo1.Top=40 Procss.Memo1.Width=215
Procss.Memo1.Color="0x80FEBF" Procss.Memo1.Font.Size=9 Procss.Memo1.Font.Color="0x000000"
Procss.Memo1.ScrollBars="ssAutoBoth" Procss.Memo1.Visible=true Procss.Memo1.WordWrap=false
Procss.Memo1.ShowHint=true
Procss.Memo1.Hint="Double-click the selection to move the process name into the filter box."
Procss.Memo2 = createMemo(Procss.Pnl4)
Procss.Memo2.Left=235 Procss.Memo2.Height=170 Procss.Memo2.Top=40 Procss.Memo2.Width=215
Procss.Memo2.Color="0x80FEBF" Procss.Memo2.Font.Size=9 Procss.Memo2.Font.Color="0x000000"
Procss.Memo2.ScrollBars="ssAutoBoth" Procss.Memo2.Visible=true Procss.Memo2.WordWrap=false
Procss.Memo2.ShowHint=true
Procss.Memo2.Hint="Double-click the selection to confirm the process."
--============================================================================--
function PanelEffect1(name1)
name1.BevelColor="0xFE0000"
name1.BevelWidth=3 name1.Cursor=-21
name1.OnMouseMove=function() name1.BevelColor="0x7F00FF" end
name1.OnMouseLeave=function() name1.BevelColor="0xFE0000" end
end
PanelEffect1(Procss.Pnl2) PanelEffect1(Procss.Pnl3) PanelEffect1(Procss.Pnl5)
PanelEffect1(Procss.Pnl6) PanelEffect1(Procss.Pnl7) PanelEffect1(Procss.Pnl8)
--============================================================================--
function foreText()
Procss.Memo2.Lines.Text=""
pid = getForegroundProcess()
local SL = createStringlist()
getWindowlist(SL)
all_handle = {}
for i=0, strings_getCount(SL)-1 do
local string_handle = SL[i]
string_handle = string_handle:sub(10, 355)
all_handle[i] = findWindow(nil, string_handle)
if executeCodeLocal('IsWindowVisible', all_handle[i]) == 1 then --User32. all_handle[i]
local pPID = (SL[i]:sub(1,8));
local dec = tonumber(pPID, 16);
local pDesc=SL[i]
pDesc=pDesc:sub(10, 355)
Procss.Memo2.Lines.Add("__"..dec.."__>"..pDesc)
end
end
if SL then SL.destroy(); SL=nil end
end
function ComboWrite()
Procss.Memo2.Lines.Text=""
for i = 0, Procss.Memo1.Lines.Count-1 do
yname=Procss.Memo1.Lines[i]:match("__>(.*).exe")
if yname~=nil then
yname1=yname..".exe"
caption=Procss.CBox1.Text
if yname1==caption then
--print("caption11: "..list.Items[i])
Procss.Memo2.Lines.Add(Procss.Memo1.Lines[i])
end
end
end
if Procss.Memo2.Lines.Text=="" then
Procss.Memo2.Lines.Add(caption.." not found!")
end
end
function GetTheTableList()
local T = {}
local SL=createStringlist()
SL.Text=Procss.Memo1.Lines.Text
for i=0,strings_getCount(SL)-1 do
T[i] = strings_getString(SL,i)
--print("T - "..T[i]) -- Output
end
SL = nil
return T
end
function List_of_Search()
if Procss.Edt1.Text=="" then
showMessage("Please type a process name in the filter box!")
else
Procss.Memo2.Lines.Text=""
local string_to_find = Procss.Edt1.Text
local new_list = {}
for i, v in ipairs(GetTheTableList()) do
if v:find(string_to_find) then
table.insert(new_list, v)
end
end
for i, v in ipairs(new_list) do
Procss.Memo2.Lines.Add(v)
end
if Procss.Memo2.Lines.Text=="" then
Procss.Memo2.Lines.Add("Process Not Found!!!") end
end
end
function selectFilterName()
local pro2 = Procss.Memo1.SelText
local procname1 = (pro2):match("__>(.*).exe")
if procname1~=nil then
Procss.Edt1.Text = procname1..".exe"
end
end
Procss.Memo1.OnDblClick=selectFilterName
-------------------------------------------
function ProcessMemory(pro,pro11)
currentprocesslist1 = {}
function ProcessMatch(s)
for _,v in pairs(process11(pro)) do
if s:match(v:lower()) then return true end
end
return false
end
function SortByKey(T,K,reverse)
if reverse==true then table.sort(T, function (a,b) return a[K] > b[K] end)
else table.sort(T, function (a,b) return a[K] < b[K] end) end
return T
end
function filterprocess()
local handle = io.popen( "tasklist.exe /fo csv" )
local processTable = {}
local skip = true
local tmp = nil
for line in handle:lines() do
if skip then skip = false
else
tmp = {}
for t in line:gmatch('\"(.-)\"') do
table.insert(tmp,t)
end
local processName = tmp[1]
local PID = tmp[2]
local MemoryUsage = tmp[5]:gsub("[^%d]",'')+0 -- +0 converts to number
local entry = { processName=processName, PID=PID, MemoryUsage=MemoryUsage }
processTable[#processTable+1] = entry
end
end
handle:close()
return SortByKey(processTable,'MemoryUsage',true)
end
function RefreshList1()
Procss.Memo1.Lines.Text=""
currentprocesslist1 = filterprocess()
if ( #currentprocesslist1 > 0 ) then
for _,v in ipairs( currentprocesslist1 ) do
if pro11==true then
prcnm=(string.format('%.1f',v.MemoryUsage/1024)..'MB__'..v.PID..'__>'..v.processName)
Procss.Memo1.Lines.Add(prcnm)
else
if pro==v.processName then
prcnm=(string.format('%.1f',v.MemoryUsage/1024)..'MB__'..v.PID..'__>'..v.processName)
Procss.Memo1.Lines.Add(prcnm) end
end
end
else
return showMessage( "Couldn't find any useful process" )
end
end
RefreshList1()
end
Procss.Pnl5.OnClick=function()
ProcessMemory("chrome.exe",true)
end
Wprocss = { 'chrome.exe','plugin-container.exe',
'Maxthon.exe','opera.exe','brave.exe','firefox.exe','torch.exe' }
Procss.CBox1.Items.Clear()
Procss.CBox1.Items.Add("Filter Process")
Procss.CBox1.Items.Add(Wprocss[1])
Procss.CBox1.Items.Add(Wprocss[2])
Procss.CBox1.Items.Add(Wprocss[3])
Procss.CBox1.Items.Add(Wprocss[4])
Procss.CBox1.Items.Add(Wprocss[5])
Procss.CBox1.Items.Add(Wprocss[6])
Procss.CBox1.Items.Add(Wprocss[7])
Procss.CBox1.Items.Add(Wprocss[8])
Procss.CBox1.ItemIndex=0
Procss.CBox1.OnChange=function()
if Procss.Memo1.Lines.Text=="" then
showMessage("Pleace Click 'All Process List' button!")
else
ComboWrite()
end
end
Procss.Pnl6.OnClick=function()
List_of_Search()
end
function attaching()
local pro1 = Procss.Memo2.SelText
if pro1 == "" then return end
local process = pro1
--print("process: "..process)
process1, process2 = string.match(process, '__(%d*)__>(.*)')
process1 = tonumber(process1)
prc22=openProcess(process1)
if prc22~=nil then
--print(process1.." - "..process2)
sleep(200)
--ProcssForm.Close()
else
sleep(200)
--ProcssForm.Close()
end
end
Procss.Pnl8.OnClick=function()
foreText()
end
Procss.Memo2.OnDblClick=attaching
Procss.Pnl2.OnClick=function()
ProcssForm.WindowState="wsMinimized"
end
Procss.Pnl3.OnClick=function()
ProcssForm.Close()
end
Procss.Pnl7.OnClick=function()
--shellExecute("https://fuck.me/2FPOSnK")
shellExecute("https://www.paypal.com/xclick/business=dark_byte%40hotmail.com&no_note=1&tax=0&lc=US")
end
end
--CE add Menu Item;
mainMenu = getMainForm().Menu.Items
local miProcss = createMenuItem(getMainForm().MainMenu)
miProcss.Name = 'miProcss'
miProcss.Caption = 'ProcessList'
mainMenu.insert(mainMenu.Count-1,miProcss)
miProcss.OnClick=processListStart |
CE Autorun plugins: https://www.mediafire.com/file/04sn8fvlouepibr/prcsFilter2.lua/file
See you on the next useful topic.
Enjoy it!
Description: |
|
Filesize: |
19.98 KB |
Viewed: |
14052 Time(s) |
|
_________________
|
|