To re-state what Ron and Aaron already said, the on/off hotkeys setting is stored per set file. So when you switch to another window, another set file gets loaded, meaning the hotkey setting will be pulled from that active set file.

Aaron

martin webster wrote:
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.




--
To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information
pertinent to your situation when submitting a problem report to the GW
Micro Technical Support Team.

Aaron Smith
GW Micro
Phone: 260/489-3671
Fax: 260/489-2608
WWW: http://www.gwmicro.com
FTP: ftp://ftp.gwmicro.com
Technical Support & Web Development

Reply via email to