Guest tmcradnet Posted September 2, 2005 Posted September 2, 2005 I am having a problem with caps lock. I have an app that registeres a hotkey when you are in one application but (theoretically) frees up the key when you are in any other application. Right now it works fine until a user pushes caps lock. When a user pushes caps lock all letters are in lowercase. I saw some examples on this forum but it doesn't seem to work. I simplified my code to test this out, basically if you are in freecell the message box pops up but once you go into word the capslock doesn't register. Thanks Ben HotKeySet("i", "FunOne");inverts image While 1 Sleep(100) WEnd Func FunOne() If WinActive("FreeCell") Then MsgBox(4096, "MenuBox", "You are in FreeCell", 10) Else HotKeySet("i") Send("i") HotKeySet("i", "FunOne") Endif EndFunc
Westi Posted September 2, 2005 Posted September 2, 2005 HotKeySet("i", "FunOne");inverts image HotKeySet("I", "FunOne") While 1 Sleep(100) WEnd Func FunOne() If WinActive("FreeCell") Then MsgBox(4096, "MenuBox", "You are in FreeCell", 10) Else HotKeySet("i") HotKeySet("I") Send("i") HotKeySet("i", "FunOne") HotKeySet("I", "FunOne") Endif EndFunc
Guest tmcradnet Posted September 2, 2005 Posted September 2, 2005 That didn't work, infact it made it so that I can't use the shift key to capitilize it. Any other suggestions?
Valuater Posted September 2, 2005 Posted September 2, 2005 nopper... I spent a lot of time.. and can't fix it 8)
Guest tmcradnet Posted September 2, 2005 Posted September 2, 2005 Is there a way I can pause a script when a window isn't active and then reengage it once it is selected?
AutoChris Posted September 3, 2005 Posted September 3, 2005 (edited) Try this:HotKeySet("i", "FunOne");inverts image HotKeySet("+i", "FunOne") While 1 Sleep(100) WEnd Func FunOne() If WinActive("FreeCell") Then MsgBox(4096, "MenuBox", "You are in FreeCell", 10) Else HotKeySet("i") HotKeySet("+i") Send("i") HotKeySet("i", "FunOne") HotKeySet("+i", "FunOne") Endif EndFuncIs there a way I can pause a script when a window isn't active and then reengage it once it is selected?This script basically does that. It keeps running (in the background) until the window is active. However, if you just want the script to pause, take a look at WinWaitActive() or WinExists().Edit: code looked strange Edited September 3, 2005 by SerialKiller
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now