Sign in to follow this  
Followers 0
dromenox

Running Process

8 posts in this topic

How can I list all the processes running in a ListView with the PID and the process name as columns? 
 
And when I press a button to display the PID of the process selected in this list?

Share this post


Link to post
Share on other sites



dromenox,

Use ProcessList to get the information into an array and then put the array elements into rows within a ListView. Then when you press the button you use _GUICtrlListView_GetSelectedIndices to get the index and read the associated PID value. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

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

#3 ·  Posted (edited)

dromenox,

Use ProcessList to get the information into an array and then put the array elements into rows within a ListView. Then when you press the button you use _GUICtrlListView_GetSelectedIndices to get the index and read the associated PID value. :)

M23

 

Thank you! And how can I make the ListView to sort alphabetically by name of the process and enable the button when I click on an element?

When I use the style as 0x0010 the PIDs does not appear.

Edited by dromenox

Share this post


Link to post
Share on other sites

Have a look at Melba23s' signature for GUIListViewEx. Great UDF for working with ListViews ;)


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

dromenox,

if you look in the Help file for the ListView creation functions you will see that the $LVS_SORTASCENDING/_SORTDESCENDING styles are available - that should manage your first request. :)

As to detecting a click on a ListView, there are many threads on the forum dealing with that - or you might just want to look >here. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

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

dromenox,

if you look in the Help file for the ListView creation functions you will see that the $LVS_SORTASCENDING/_SORTDESCENDING styles are available - that should manage your first request. :)

As to detecting a click on a ListView, there are many threads on the forum dealing with that - or you might just want to look >here. ;)

M23

I edited my post, when I do that the PIDs not appear.

Share this post


Link to post
Share on other sites

How about you post what you have, so we can see what you're doing, rather than asking us to guess?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

dromenox,

You have been here long enough to know that you need to post some code if you expect to get help - just saying it does not work is no use at all. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

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  
Followers 0