Bishop12 Posted April 28, 2019 Share Posted April 28, 2019 (edited) 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 . expandcollapse popup#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) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $List1 list() EndSwitch WEnd 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 EndIf Next EndFunc msgbox(0,"",$Title) Func IDtoName($Handle) Dim $ProcList = ProcessList() For $i = 1 To $ProcList[0][0] If $ProcList[$i][1] = $Handle Then Return ($ProcList[$i][0]) EndIf Next EndFunc Func IsVisible($Handle) If BitAND( WinGetState($Handle), 2) Then Return 1 Else Return 0 EndIf EndFunc Edited April 28, 2019 by Bishop12 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 28, 2019 Moderators Share Posted April 28, 2019 Bishop12, 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. M23 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. FrancescoDiMuro 1 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