Possible to get PID from Window Name?
#1
Posted 12 July 2009 - 08:33 AM
#2
Posted 12 July 2009 - 08:40 AM
Do you think this function I found in the Help file might be what you are looking for?
WinGetProcess: Retrieves the Process ID (PID) associated with a window.
WinGetProcess ( "title" [, "text"] )
M23
Toast - Small GUIs which pop out of the Systray - Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command - GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI - NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure - - Notify - Small notifications on the edge of the display
RecFileListToArray - An alternative to _FileListToArray with user-defined include/exclude masks, maximum recursion level, sorting and displayed path options
GUIListViewEx - Insert, delete, move, drag and sort ListView items
#3
Posted 12 July 2009 - 08:57 AM
I used something along the lines of $pid = DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $hWnd, "int_ptr", 0)
EDIT: I also suggest the Help file be updated, seems like it didn't list many ways and thats why I was confused.
is the unique number which identifies a Process. A PID can be obtained through the ProcessExists or Run commands.
The process is polled approximately every 250 milliseconds.
Edited by lolp1, 12 July 2009 - 09:00 AM.
#4
Posted 12 July 2009 - 03:55 PM
#5
Posted 12 July 2009 - 04:47 PM
#6
Posted 13 July 2009 - 01:15 AM
You only need one way. In a language, having many different built in functions that do the same thing is redundant and pointless. Look at the help file first, search the forum second, then search google, and if you still can't find the answer, ask someone on the forum. This could have been found if you follow these steps.
For what I needed I needed the PID from the window name - I did a google search/auto it help file and found nothing auto it related, hence my fix using the DllFunc call of auto it...
#7
Posted 13 July 2009 - 02:19 AM
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users





