Jump to content
Sign in to follow this  

Getting ProcessList of only 1Application

Recommended Posts

hi my trying to do my best and searching for my problem i already get some codes for getting window processlist but i want is to get only the process list of my application like note pad note pad have 0x0123123 or etc etc and i want only is to get there name # like 0x001235 something like that and then if its already get then do some function the problem is i cant get the processlist that i want  any one can give me some help or sample ? thankyou respect newbie..  i just creat a simple code for it  i know theres a lot of way to do it in easy way but i cant find it  another example like theres 2 application open in the same time i can get the title of that application like notepad but  they have the same title if i got it then do function and how about if its 2 notepad open and i want is to process only into 1 note pad but code cant figure out what notepad i want to proces so autoit will get any of those 2 note pad and i cant say get only the first note pad not the 2nd one help sorry for bad explanation i cant explaine it in more easy way .

#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 370, 236, 192, 114)
$List1 = GUICtrlCreateList("", 16, 64, 137, 32)
#EndRegion ### END Koda GUI section ###

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


Local $List = WinList()
Local $Title = ""

Func list()
For $i = 1 To $List[0][0]

;uncomment to show all visible programs

;If $List[$i][0] <> "" And IsVisible($List[$i][1]) Then

;uncomment to show all programs

If $List[$i][0] <> "" Then

Dim $Process = IDtoName( WinGetProcess($List[$i][0]))

$Title &= $Process & @TAB & $List[$i][0] & @CRLF



Func IDtoName($Handle)

Dim $ProcList = ProcessList()

For $i = 1 To $ProcList[0][0]

If $ProcList[$i][1] = $Handle Then

Return ($ProcList[$i][0])



Func IsVisible($Handle)

If BitAND( WinGetState($Handle), 2) Then

Return 1


Return 0




Edited by Bishop12

Share this post

Link to post
Share on other sites


And how is this different from the thread you started yesterday and which was locked? Other than in leaving out the game references - which the Forum rules make quite clear is not allowed.


P.S. And just to be absolutely clear (as some still seem to have recognising what is going on) - this is the Mod team determining the legality of the thread, so everyone else please keep out.

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:


ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area


Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...