dromenox Posted September 23, 2014 Share Posted September 23, 2014 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? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 23, 2014 Moderators Share Posted September 23, 2014 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
dromenox Posted September 23, 2014 Author Share Posted September 23, 2014 (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 September 23, 2014 by dromenox Link to comment Share on other sites More sharing options...
MikahS Posted September 23, 2014 Share Posted September 23, 2014 Have a look at Melba23s' signature for GUIListViewEx. Great UDF for working with ListViews Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy 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 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 23, 2014 Moderators Share Posted September 23, 2014 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
dromenox Posted September 23, 2014 Author Share Posted September 23, 2014 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. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 23, 2014 Moderators Share Posted September 23, 2014 How about you post what you have, so we can see what you're doing, rather than asking us to guess? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 23, 2014 Moderators Share Posted September 23, 2014 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now