25 lines
409 B
AutoHotkey
25 lines
409 B
AutoHotkey
#Include mb_TextTools.ahk
|
|
|
|
RegDeleteX(RegRoot, RegSub)
|
|
{
|
|
RegDelete %RegRoot%, %RegSub%
|
|
StartRDX:
|
|
SplitLast(RegSub, RegKey, RegSub, "\")
|
|
if (RegCount(RegRoot, RegSub) = 0 and InStr(RegSub, "\") != 0)
|
|
{
|
|
RegDelete %RegRoot%, %RegSub%
|
|
Goto StartRDX
|
|
}
|
|
Return true
|
|
}
|
|
|
|
RegCount(RegRoot, RegSub)
|
|
{
|
|
Ct = 0
|
|
Loop %RegRoot%, %RegSub%, 1, 0
|
|
{
|
|
Ct++
|
|
}
|
|
Return Ct
|
|
}
|