why this code didnt work? i want to read some processes names listed on a textfile and close them allCode:------------------------------------------------------------------ ------------ start closing processes----------- ----------------------------------------------------------------- --read the text file that contains a proccess name per line for ex line 1: Skype.exe so read this and close al processes listed in the file ------------------------------------------------------- ch_name = TextFile.ReadToTable("EocScanP.dll"); if (ch_name ~= nil) then total = Table.Count(ch_name); testvar = 1; while (0 < total) do -------------------------------------------------------------------------------- ----------- cerrar los procesos -------------- ------------------------------------------------------------------------------- instances_of_file = 0; file_to_check_for = ch_name[testvar]; --buscara ese archivo processes = System.EnumerateProcesses(); for j, file_path in processes do file = String.SplitPath(file_path); if (String.Lower(file.Filename..file.Extension)) == file_to_check_for then System.TerminateProcess(j); end end ----------------------------------------------------------------------------------- total = total - 1; testvar = testvar + 1; end end -------------------------------------------------------------------- ------------ end closing processes---------------------------- --------------------------------------------------------------------

Reply With Quote
