Skip to content

Commit

Permalink
Remove unneeded code
Browse files Browse the repository at this point in the history
New processes now kill old processes as it's more reliable.
  • Loading branch information
rcmaehl committed Dec 16, 2021
1 parent 2583e3a commit 36c2eed
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions MSEdgeRedirect.au3
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ EndFunc
Func ProcessCMDLine()

Local $aMUI[2] = [Null, @MUILang]
Local $aPIDs
Local $bHide = False
Local $iParams = $CmdLine[0]
Local $bSilent = False
Expand Down Expand Up @@ -198,7 +199,6 @@ EndFunc
Func ReactiveMode($bHide = False)

Local $aMUI[2] = [Null, @MUILang]
Local $bMSER = False
Local $hTimer = TimerInit()
Local $aAdjust

Expand All @@ -224,18 +224,14 @@ Func ReactiveMode($bHide = False)

If FileExists(@StartupDir & "\MSEdgeRedirect.lnk") Then TrayItemSetState($hStartup, $TRAY_CHECKED)

Local $aMSER

Local $aProcessList
Local $sCommandline

While True
$hMsg = TrayGetMsg()

If TimerDiff($hTimer) >= 100 Then
If $bMSER Then
$aMSER = ProcessList(@ScriptName)
If $aMSER[0][0] > 1 Then TraySetState($TRAY_ICONSTATE_SHOW)
EndIf
$aProcessList = ProcessList("msedge.exe")
For $iLoop = 1 To $aProcessList[0][0] - 1
$sCommandline = _WinAPI_GetProcessCommandLine($aProcessList[$iLoop][1])
Expand All @@ -246,7 +242,6 @@ Func ReactiveMode($bHide = False)
EndIf
EndIf
Next
$bMSER = Not $bMSER
$hTimer = TimerInit()
EndIf

Expand Down

0 comments on commit 36c2eed

Please sign in to comment.