Jump to content

Recommended Posts

Posted

I found this has worked everytime. I used the code at the bottom of the WinKill help to find the class info.

Case ProcessExists("EXCEL.EXE")

$MSOList1 = _WinAPI_EnumWindows()

For $i = 1 To $MSOList1[0][0]

If $MSOList1[$i][1] = "XLMAIN" Then

$MSOTitle1 = WinGetTitle($MSOList1[$i][0])

WinKill($MSOTitle1)

EndIf

Next

Case ProcessExists("WINWORD.EXE")

$MSOList2 = _WinAPI_EnumWindows()

For $j = 1 To $MSOList2[0][0]

If $MSOList2[$j][1] = "OpusApp" Then

$MSOTitle2 = WinGetTitle($MSOList2[$j][0])

WinKill($MSOTitle2)

EndIf

Next

Case ProcessExists("OUTLOOK.EXE")

$MSOList3 = _WinAPI_EnumWindows()

For $k = 1 To $MSOList3[0][0]

If $MSOList3[$k][1] = "rctrl_renwnd32" Then

$MSOTitle3 = WinGetTitle($MSOList3[$k][0])

WinKill($MSOTitle3)

EndIf

Next

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
  • Recently Browsing   0 members

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