ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Coding Snacks

Sticky Keys Ahk request

<< < (3/5) > >>

CleverCat:
Yes 510 off 511 on. Now when I turn off I get the message box, click ok then they don't come on...

Or will it only work if I lose them without doing anything?

CleverCat:
Is the script right?

#SingleInstance Force
#Persistent
#NoEnv

SetTimer, Timer, 2000

Timer:
OldValue := OutputVar
RegRead, OutputVar, HKEY_CURRENT_USER, Control Panel\Accessibility\StickyKeys, Flags
IfNotEqual, OldValue, %OutputVar%
If OutputVar <> 511
   {
      MsgBox, 68, Sticky Keys, The Sticky Keys are turned off. Would you like to turn them on?
         IfMsgBox Yes
            RegWrite, REG_SZ, HKEY_CURRENT_USER, Control Panel\Accessibility\StickyKeys, Flags, 511
   }
Return
--- End quote ---

aCkRiTe:
Yes that is correct... I see whats happening now. When you click on yes in the message box to turn on the Sticky Keys, it updates the registry with the correct value, but if you run access.cpl, you will notice the check box for use Sticky Keys is still not checked. Im not sure why, but will see if there is anything I can come up with that updates to turn the Sticky Keys on. I assumed changing the registry value would do this, but thats not the case.

CleverCat:
I'm happy for now aCkRite as at least I know they are off and can easily turn them on!  ;)

Thanks for your help - much appreciated... :Thmbsup:

aCkRiTe:
This is really ugly, but it works for now I guess....  :-[


--- ---#SingleInstance Force
#Persistent
#NoEnv

SetTimer, Timer, 2000

Timer:
OldValue := OutputVar
RegRead, OutputVar, HKEY_CURRENT_USER, Control Panel\Accessibility\StickyKeys, Flags
IfNotEqual, OldValue, %OutputVar%
If OutputVar <> 511
{
MsgBox, 68, Sticky Keys, The Sticky Keys are turned off. Would you like to turn them on?
IfMsgBox Yes
{
RegWrite, REG_SZ, HKEY_CURRENT_USER, Control Panel\Accessibility\StickyKeys, Flags, 511
Run, Access.cpl
WinWait, Accessibility Options
WinWaitActive, Accessibility Options
Send, {Space}{Enter}
}
}
Return

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version