--- In [email protected], Brother Gabriel-Marie <brgabr...@...> wrote:
>
> How about this binary toggle? Can anyone fix this for me, please?
> ;Toggle Current User's Windows Hotkeys on or off
> function Winkeys(how)
> static originalwinkeys
First reaction: for something as important as a registry setting like this, I
don't think I'd trust a static. If Powerpro dies or you sht down the machine,
static value is lost.
> local ExplorerKey =
> ?"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
> If (how == 0) or (how == "")do ;;DISABLE
> originalwinkeys = reg.get_binary("NoWinKeys",ExplorerKey)
(a) It's a DWORD, not binary, according to quick look I had
(b) why not make a key specially for your own use e.g.
(c) aren't Key and value wrong way round?
HKEY_CURRENT_USER\Software\PowerPro
and store a DWORD NoWinKeyOrig there?
> ;;remember for later
> reg.set_binary(ExplorerKey,"NoWinKeys","00000001")
Quick look at docs suggest that won;t take effect until you restart, or maybe
logoff and on.
> ElseIf (how ==1)do ;;ENABLE
> originalwinkeys = reg.get_binary("NoWinKeys",ExplorerKey)
aren't key and value wrong way round?
> ;;remember for later
> reg.set_binary(ExplorerKey,"NoWinKeys","00000000")
> ElseIf (how==3)do ;;Return Original Value
> reg.set_binary(ExplorerKey,"NoWinKeys","originalwinkeys")
> EndIf