Hi all,
Below is a VBscript routine that will switch hotkeys off at the press of a
hotkey, and then when the same hotkey is pressed again, will switch them back
on; kind of. If I alt tab and the hotkeys are off they will come back on and
viseversa; why?.
Begin VBscript.
Dim retval, MyKey, KeyState
MyKeyState = False
Set MyKey = Keyboard.RegisterHotkey("control-r", "HandleKey")
Sub HandleKey()
retval = ConnectEvent(DesktopWindow, "OnChildActivate", "MyOnChildActivate")
End Sub
Sub MyOnChildActivate(win)
If KeyState Then
Speak "reconnecting hotkeys"
win.Overlap.Settings.General.Hotkeys = True
Disconnect retval
KeyState = False
Else
win.Overlap.Settings.General.Hotkeys = False
Speak "hot keys disconnected"
KeyState = True
End If
End Sub
Can somebody tell me why this is accurring, I think it is something to do with
other setfiles loading, and if so how can I prevent them from doing so.
Warm regards.
Martin Webster.