<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="24">
  <CheatEntries>
    <CheatEntry>
      <ID>0</ID>
      <Description>"Group 1"</Description>
      <LastState Value="" RealAddress="00000000"/>
      <GroupHeader>1</GroupHeader>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
  <LuaScript>
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
            --S[#S+1] = PL[x]  --list for reference
            list.Items.Add(PL[x])
            end

    	 end
     end


end


function OpenPro()

  local a = list.ItemIndex

    if a ~= -1 -- negative 1 is nno selection
    then
     local b = string.sub(list.Items[a],0,8)
     b = tonumber(b,16)
     openProcess(b)
    else
     print("Nothing")
    end

end



fo = createForm()
fo.Height = 330
fo.Width = 200
fo.Position = poScreenCenter

list = createListBox(fo)
list.Left = 20
list.Top = 20
list.Width = fo.Width - (list.Left*2)
list.Height = 200

b = createButton(fo)
b.Top = 260
b.Caption = "Get Pro's"
b.Left = 20
b.OnClick = GetPros

b2 = createButton(fo)
b2.Top = 260
b2.Caption = "Attach"
b2.Left = 105
b2.OnClick = OpenPro

drop = createComboBox(fo)
drop.Width = list.Width
drop.Top = 230
drop.Left = 20
drop.Text = "All"
drop.Items.Add('All')
drop.Items.Add('Firefox.exe')
drop.Items.Add('chrome.exe')
drop.Items.Add('opera.exe')
drop.Items.Add('notepad.exe')
drop.Items.Add('calc.exe')





</LuaScript>
</CheatTable>
