Hello, I don't know if I'm really clear on what I am asking. I did a search and didn't find what I'm looking for or my logic don't allow me to find out the answers.
I am doing a little program for students that are taking exams. What I want to do is start an exam for the student and take the running processlist (especially the PIDs). I throw everything inside an array and during the exam, I take again all the running processlist and throw it inside a second array.
After, I want to compare the two arrays and kill each process that appears in the second arrays that are not in the first arrays.
Right now, what I did is :
#include <Array.au3>
$ProcessList1 = ProcessList()
$NumberOfProcess = $ProcessList1[0][0]
While 1
For $j = 0 To 100
$ProcessList2 = ProcessList()
$NumberOfProcess2 = $ProcessList2[0][0]
For $i = 0 To UBound($ProcessList2)-1
$found = _ArraySearch($ProcessList1, $ProcessList2[$i][1])
ProcessClose($found)
Next
Next
Wend
I know this is not working but am I using the good logic to compare the two and kill differences? What can I do to make this code works?
Thanks a lot.