| View previous topic :: View next topic |
| Author |
Message |
ai4fu
Joined: 09 Dec 2007 Posts: 10
|
Posted: Fri Jan 11, 2008 5:58 pm Post subject: Force all uppercase for a program and its child windows |
|
|
I have a program that requires frequent data entry. I have been able to automate several parts of the data entry but I need a way to make all entries for this program into all caps regardless of the capslock setting.
I am not the worlds best typist and I hate having to go back and correct my entries if I forgot to check if the capslock light was on. There should be a way to make all entries for that one program and all of its child windows go in as capitals only but the method escapes me. However, I also need it to revert to "normal" if that window is not active. (I think I can code that last bit myself)
Anyone have an idea on this? Thanks... |
|
| Back to top |
|
 |
ManaUser
Joined: 24 May 2007 Posts: 906
|
Posted: Fri Jan 11, 2008 6:38 pm Post subject: |
|
|
See if this does what you want:
| Code: | #IfWinActive Your Window Title
a::Send A
b::Send B
c::Send C
;etc
+a::Send A
+b::Send B
+c::Send C
;etc
#IfWinActive |
|
|
| Back to top |
|
 |
[VxE]
Joined: 07 Oct 2006 Posts: 1499
|
Posted: Fri Jan 11, 2008 8:51 pm Post subject: |
|
|
Alternatively, you can put IfWinActive "blah" { SetCapsLockState on/off } into a timer like so: | Code: | SetTimer, iHaTeToChEcKmYCaPs, 100
iHaTeToChEcKmYCaPs:
IfWinActive, My Window Title
SetCapsLockState, on
Else IfWinActive, My Next Window Title
SetCapsLockState, on
Else
SetCapsLockState, off
return |
And then you can tweak it to only switch the capslock state once per change of window (so you can still use the capslock key normally) _________________ My Home Thread
More Common Answers: [1]. It's in the FAQ [2]. Ternary ( a ? b : c ) guide [3]. Post code inside [code][/code] tags ! |
|
| Back to top |
|
 |
ai4fu
Joined: 09 Dec 2007 Posts: 10
|
Posted: Sun Jan 13, 2008 9:33 am Post subject: |
|
|
| Cool, that works....actually they both work but the second one is marginally faster so that's the one I'll use... Thanks for the help!! |
|
| Back to top |
|
 |
HAL9000
Joined: 16 Jan 2008 Posts: 1
|
Posted: Wed Jan 16, 2008 7:49 pm Post subject: |
|
|
I am new to AHK. I am wondering what you meant about the comment quoted below. Can you post an example?
Thanks
And then you can tweak it to only switch the capslock state once per change of window (so you can still use the capslock key normally)[/quote] |
|
| Back to top |
|
 |
|