[Help]Isolate new ID in a Int32 array[Solved]

Posts 1–4 of 4 · Page 1 of 1
[Help]Isolate new ID in a Int32 array[Solved]
talkin ps3 so can say much


ok i have an array of int32 . (processids of processes with the same name)

what i want is it i start an other process with the same name i will like the id of the new process only......


example...
I have 2 notepads open.
i have the IDs of those two
then i start another notepad...Iwill like that ID only.
and if i close a notepad
no ids show as a side effect

I have tryed and fail.when something new comes up the old ids still show

thank you

ps: I am getting good at this ps3 typing thing
[php]
Dim latestID As Int32 = 0
Dim FirstIDs() As Int32 = Array.ConvertAll(Process.GetProcessesByName("notep ad"), Function(proc) proc.ID)
'open new notepad'
Dim IDenum As iEnumerable(Of Int32) = (From x As Int32 In Array.ConvertAll(Process.GetProcessesByName("notep ad"), Function(proc) proc.ID) Where Not FirstIDs.Contains(x) Select x)
If IDenum.Count > 0 then latestID = IDenum(0)
[/php]

Somefing like that.

Of course, you might need to split this into separate parts to do what you need, but this will isolate the new ID.
Quote Originally Posted by Jason View Post
[php]
Dim latestID As Int32 = 0
Dim FirstIDs() As Int32 = Array.ConvertAll(Process.GetProcessesByName("notep ad"), Function(proc) proc.ID)
'open new notepad'
Dim IDenum As iEnumerable(Of Int32) = (From x As Int32 In Array.ConvertAll(Process.GetProcessesByName("notep ad"), Function(proc) proc.ID) Where Not FirstIDs.Contains(x) Select x)
If IDenum.Count > 0 then latestID = IDenum(0)
[/php]

Somefing like that.

Of course, you might need to split this into separate parts to do what you need, but this will isolate the new ID.
thanks its works. mine was a lost more code for almost the same result

up from 2am til 6.30am doing this thanks again
Quote Originally Posted by topblast View Post


thanks its works. mine was a lost more code for almost the same result

up from 2am til 6.30am doing this thanks again
Not a problem, glad I could help.
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us