Process wait

10/23/2012 17:59 EasyForEver#1
any one know code process wait by name can add it in ConsoleApplication ?
10/23/2012 18:30 3Angle#2
Threading.Thread.Sleep(time in milliseconds)
10/23/2012 19:18 bammes#3
Hm do you mean [Only registered and activated users can see links. Click Here To Register...]
?
10/23/2012 19:22 Tiion♥#4
Yes i think he mean this :)
10/23/2012 19:30 EasyForEver#5
Quote:
Originally Posted by bammes View Post
Hm do you mean [Only registered and activated users can see links. Click Here To Register...]
?
yes i maen this but i need this code

no one know ?
10/27/2012 09:24 3Angle#6
You must be a beginner without any knowegde... That is the function code!
10/27/2012 12:56 vwap#7
Do you mean "Wait" that the console doesn't close automatically?
If yes, try Console.ReadLine().
10/27/2012 13:25 bammes#8
Quote:
Originally Posted by EasyForEver View Post
yes i maen this but i need this code

no one know ?
[Only registered and activated users can see links. Click Here To Register...]

erstes Ergebnis -_-
10/28/2012 02:42 coladose#9
If you mean like waiting for a process to start do it like this:

PHP Code:
 Public Function ProcessWait(ByVal ProcName As String) As Boolean
        Process
.EnterDebugMode()
        
Dim time As Integer 50
        
If ProcName "" Or ProcName.Contains(".exe") = True Then
            
Return -1
            
Exit Function

        Else

            Do 
Until Process.GetProcessesByName(ProcName).Length 0

                SLeep
(time)

            
Loop
            
Return True
            
Exit Function
        
End If

    
End Function

Public 
Sub SLeep(ByVal Time As Integer)
        
Dim Start As Date DateTime.Now()

        Do 
Until DateDiff(DateInterval.SecondStartNow) > Time 1000
            System
.Threading.Thread.Sleep(10)
        
Loop

    End Sub

'#################################
'
Your code would be like this
'#################################

Dim ProcName As String = String.Empty
ProcName = "calc"

Do Until ProcessWait(ProcName) = True
Sleep(50)
Loop

MsgBox("Process: " & ProcName & ".exe found!")

.....