spuuunit Posted November 21, 2013 Posted November 21, 2013 I want to make a pop up that displays the process name for the currently active window ("firefox.exe" for example). How do I get this name? While 1 Sleep(2000) MsgBox(4096, "Process Name", "Process Name: " & ??????????) WEnd
JohnOne Posted November 21, 2013 Posted November 21, 2013 Functions from >this code by kafu should get you started. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Celtic88 Posted November 21, 2013 Posted November 21, 2013 Local $Actwin = WinGetHandle("[active]") Local $PidActwin = WinGetProcess($Actwin) Local $NamePidActwin = _Findpidname($PidActwin) MsgBox(0, '', $NamePidActwin) Func _Findpidname($Pid) Local $Processlist = ProcessList() For $i = 1 To $Processlist[0][0] If $Processlist[$i][1] = $Pid Then Return $Processlist[$i][0] Next EndFunc ;==>_Findpidname Fubarable 1
spuuunit Posted November 22, 2013 Author Posted November 22, 2013 So Local $Actwin = WinGetHandle("[active]") Local $PidActwin = WinGetProcess($Actwin) Local $NamePidActwin = _Findpidname($PidActwin) MsgBox(0, '', $NamePidActwin) Func _Findpidname($Pid) Local $Processlist = ProcessList() For $i = 1 To $Processlist[0][0] If $Processlist[$i][1] = $Pid Then Return $Processlist[$i][0] Next EndFunc ;==>_Findpidname Sorry for the wait, but I've now tried your code, and it works verry well, thanks . Thanks to you too John.
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