-------------------------------------------------------------------------------- ---------- Cheat Engine Check For Active Scripts ------------------------------ -------------------------------------------------------------------------------- local originalclose = getMainForm().OnClose local function Ask_Cheats_Off() local Pro = string.sub(getMainForm().Component[7].Caption,10) local list = getAddressList() local D = {} ---- TAble for display local ID = {} if readInteger(Pro) ~= nil then for j =0, list.count-1 do if (list.MemoryRecord[j].Active == true and list.MemoryRecord[j].Type == 11) then D[#D+1] = list.MemoryRecord[j].Description ID[#D] = list.MemoryRecord[j].ID end end ---| if #D > 0 then local Ask = messageDialog(#D.." Injections(Scripts) are still [Active]:\n\n"..table.concat (D,'\n').."\n\nDo you wish to [DeActivate] Entries before close?",mtConfirmation, mbYes, mbNo, mbCancel) if Ask == mrYes then for y=#ID, 1,-1 do --print(ID[y]..y) -- yep it backwards list.getMemoryRecordByID(ID[y]).Active = false end originalclose(sender) return caFree end ---| if Ask == mrNo then originalclose(sender) return caFree end -- if Ask==mrCancel then end else originalclose(sender) return caFree end else originalclose(sender) return caFree end end getMainForm().OnClose = Ask_Cheats_Off