I am a total amatuer programmer. I mainly just build little apps that are mainly useful to me. So please be gentle.

I am currently working on a program that will paste text into a second program. The text will paste into several different fields automatically.

The problem I am running into is that I need my program to check for running processes(as the second app will already be running). I seem to have done this just fine. When I then need to "use" that process

I use myprocess.start()

This of course starts a second instance of the application in question.

How do I basically use a process that is running as if I used the command .start()?

Sorry if this is answered somewhere else. I have been searching everywhere.


Thank you for the reply
I have read that article. I seem to be getting a reference to the proper process but I cant seem to activate so that I can paste text to it.

Code below

Dim cernerprocess() As Process
        Dim seperation As String

        cernerprocess = Process.GetProcessesByName("notepad")

        If cernerprocess.Length = 1 Then


            If cernerprocess(0).Responding Then
                seperation = vbNewLine & vbNewLine & "======TEST======" & vbNewLine & vbNewLine
            End If

        End If

This code works if I start a new instance of notepad using this
process.start command

I think I found a solution!


Nice one Adam_K. Please mark thread as solved if solution found