Jump to content

ApplicationFrameHost.exe - getting the real app


Mateo
 Share

Recommended Posts

@Nine,

Func FindTrueApp($sTitle, $iPID, ByRef $sProcess)
  Local Static $aList = _WinAPI_EnumWindows(True)
  Local $iTruePID
  For $i = 1 To $aList[0][0]
    If WinGetTitle($aList[$i][0]) = $sTitle Then
      $iTruePID = WinGetProcess($aList[$i][0])
      If $iPID <> $iTruePID Then
        $sProcess = _WinAPI_GetProcessName($iTruePID)
        Return $iTruePID
      EndIf
    EndIf
  Next
  Return 0
EndFunc   ;==>FindTrueApp

Is there any particular reason why you used _WinAPI_EnumWindows instead of WinList?

Also, why you used

if WinGetTitle($aList[$i][0]) = $sTitle then

instead of 

if $aList[$i][1] = $sTitle then

Is there something else ?

PS. I am still getting ApplicationFrameHost.exe if the process is Calculator.exe...

Dan

 

Edited by Burgaud
Link to comment
Share on other sites

13 hours ago, Burgaud said:

Is there any particular reason why you used _WinAPI_EnumWindows instead of WinList?

I don't want to work with hidden windows and non apps windows.

13 hours ago, Burgaud said:

Also, why you used

if WinGetTitle($aList[$i][0]) = $sTitle then

Because it is handle, better to search with it.

13 hours ago, Burgaud said:

I am still getting ApplicationFrameHost.exe if the process is Calculator.exe...

Working for me.

image.thumb.png.df04d6d68fbf75fff6d129b4e131407d.png

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...