local mf = getMainForm() local sd = mf.SaveDialog1 local od = mf.OpenDialog1 local filefullpath local filename local mi local function returnFileName(path) --extracts file name from full path (not full path => return nil) return (path~=nil) and (path:match("\\([^\\]+)$")) end -- currentTableNameLabel local currentTableNameLabel = createLabel(mf) currentTableNameLabel.Name = 'currentTableNameLabel' currentTableNameLabel.Caption = '' currentTableNameLabel.Font.Assign(mf.foundcountlabel.Font) currentTableNameLabel.Parent = mf.Panel5 currentTableNameLabel.AnchorSideLeft.Control = mf.foundcountlabel currentTableNameLabel.AnchorSideLeft.Side = asrBottom currentTableNameLabel.AnchorSideTop.Control = mf.foundcountlabel currentTableNameLabel.AnchorSideTop.Side = asrCenter currentTableNameLabel.BorderSpacing.Left = 20 currentTableNameLabel.ShowHint = true currentTableNameLabel.PopupMenu=createPopupMenu(currentTableNameLabel) mi = createMenuItem(currentTableNameLabel.PopupMenu) currentTableNameLabel.PopupMenu.Items.add(mi) mi.Caption="cheat table file name - copy to clipboard" mi.OnClick=function () writeToClipboard(filename) end mi = createMenuItem(currentTableNameLabel.PopupMenu) currentTableNameLabel.PopupMenu.Items.add(mi) mi.Caption="cheat table file full path - copy to clipboard" mi.OnClick=function () writeToClipboard(filefullpath) end -- decimalPIDLabel local decimalPIDLabel = createLabel(mf) decimalPIDLabel.Name = 'decimalPIDLabel' decimalPIDLabel.Caption = '' decimalPIDLabel.Font.Assign(mf.ProcessLabel.Font) decimalPIDLabel.Parent = mf.Panel5 decimalPIDLabel.AnchorSideLeft.Control = mf.ProcessLabel decimalPIDLabel.AnchorSideLeft.Side = asrBottom decimalPIDLabel.AnchorSideTop.Control = mf.ProcessLabel decimalPIDLabel.AnchorSideTop.Side = asrCenter decimalPIDLabel.BorderSpacing.Left = 5 decimalPIDLabel.PopupMenu=createPopupMenu(decimalPIDLabel) mi = createMenuItem(decimalPIDLabel.PopupMenu) decimalPIDLabel.PopupMenu.Items.add(mi) mi.Caption="decimal PID - copy to clipboard" mi.OnClick=function () writeToClipboard(decimalPIDLabel.Caption:sub(2,-2)) end -- change ProcessLabel positioning mf.ProcessLabel.Anchors = '[akTop,akLeft]' mf.ProcessLabel.AnchorSideLeft.Control = mf.Panel5 mf.ProcessLabel.AnchorSideLeft.Side = asrCenter -- updateLabelsCaptionsTimer local updateLabelsCaptionsTimer = createTimer(mf) updateLabelsCaptionsTimer.Interval = 500 updateLabelsCaptionsTimer.OnTimer = function (t) filefullpath = sd.Filename or od.Filename or '' filename = returnFileName(filefullpath) currentTableNameLabel.Hint = filefullpath if filename then currentTableNameLabel.Caption = 'CT Name: '..filename else currentTableNameLabel.Caption = 'CT Name:' end local OpenedProcessID = getOpenedProcessID() decimalPIDLabel.Caption = (OpenedProcessID==4294967295) and '' or ('('..OpenedProcessID..')') end