Jump to content

Recommended Posts

Posted

Hello ,

Lets say we have a simple gui like this

#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 216, 79, 836, 404)
Global $Combo1 = GUICtrlCreateCombo("Combo1", 40, 24, 145, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

I would like to ask how can i get process of every programm named Notepad and list them into this combobox? I did this but the script was pretty huge :P Yes i did write it all by hand :mellow: Is there any other , simplier way? : )

Ps - thre will be always 10 + of those windows opened :party:

Posted (edited)

This worked for two windows... It should work for any number.. I'm not really sure what data you're trying to get, so I guessed

If you were to post your code (as long as it is) it would help so everyone here actually knows what you're trying to do..

$list = ProcessList("notepad.exe")
for $i = 1 to $list[0][0]
  Msgbox(0, 'Occurence #' & ($i + 1), 'PID:' & @TAB & $list[$i][0] & @CRLF & 'Name:' & @TAB & $list[$i][1])
next
Edited by Achilles
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

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
×
×
  • Create New...