Jump to content
Sign in to follow this  
Guest tmcradnet

Capslock issue

Recommended Posts

Guest tmcradnet

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

Share this post


Link to post
Share on other sites
Westi

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

Share this post


Link to post
Share on other sites
Guest tmcradnet

That didn't work, infact it made it so that I can't use the shift key to capitilize it.

Any other suggestions?

Share this post


Link to post
Share on other sites
Valuater

nopper... I spent a lot of time.. and can't fix it

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
Guest tmcradnet

Is there a way I can pause a script when a window isn't active and then reengage it once it is selected?

Share this post


Link to post
Share on other sites
AutoChris

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
EndFunc

Is 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 by SerialKiller

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.