Skip to content

Commit 8dccfbc

Browse files
authored
Update RegCleaner.au3 + $GUI_EVENT_CLOSE
1 parent c205bf7 commit 8dccfbc

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

bin/RegCleaner.au3

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,16 @@ EndFunc ;==>_Cleaner
9090

9191
;---------------------------------------------------------------------------------------
9292
Func __Registry_Scan_Recursive($sKey, $sSearch, $hLV, ByRef $iCount, $idStatus, $idBtnCancel)
93-
Local $iIndex = 1
93+
Local $iIndex = 1, $idMsg
9494
While 1
9595
Local $sSubKey = RegEnumKey($sKey, $iIndex)
9696
If @error Then ExitLoop
9797

9898
If Mod($iIndex, 100) = 0 Then
9999
GUICtrlSetData($idStatus, "Scanning: " & $iIndex & " keys in " & StringLeft($sKey, 40) & "...")
100-
If GUIGetMsg() = $idBtnCancel Then Return SetError(1)
100+
$idMsg = GUIGetMsg()
101+
If $idMsg = $idBtnCancel Then Return SetError(1)
102+
If $idMsg = $GUI_EVENT_CLOSE Then Return SetError(2)
101103
EndIf
102104

103105
Local $sFull = $sKey & "\" & $sSubKey

0 commit comments

Comments
 (0)