Jump to content

[Help] Choose which program PID will be used...


Recommended Posts

I try to create a combo to choose what PID will be used before the program starts. But when I click the Run button, it seems like frozen. :idea:

Please help!

$TheList = GUICtrlCreateCombo("", 150, 160, 70)
$ListPro = ProcessList("program.exe")
$TheAOL = ""
$ProccessID = ""

If $ListPro[0][0] > 0 Then
    For $i = 1 to $ListPro[0][0] + 1
        If $i = $ListPro[0][0] + 1 Then
            ExitLoop
        Else
            $TheAOL &= $ListPro[$i][1] & "|"
            $i = $i + 1
        EndIf
    Next
    GUICtrlSetData($TheList, $ListPro, '')
    $ProccessID = GUICtrlRead(-1)
    Else
        MsgBox(0, "Warning!", "The Program is not Workin!!!")
EndIf

$ProgramID = _MemoryOpen($ProccessID)

The following code is working fine but for all windows:

$ProccessID = ProcessExists("program.exe")
$ProgramID = _MemoryOpen($ProccessID)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...