AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Force all uppercase for a program and its child windows

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
ai4fu



Joined: 09 Dec 2007
Posts: 10

PostPosted: Fri Jan 11, 2008 5:58 pm    Post subject: Force all uppercase for a program and its child windows Reply with quote

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
View user's profile Send private message
ManaUser



Joined: 24 May 2007
Posts: 906

PostPosted: Fri Jan 11, 2008 6:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
[VxE]



Joined: 07 Oct 2006
Posts: 1499

PostPosted: Fri Jan 11, 2008 8:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
ai4fu



Joined: 09 Dec 2007
Posts: 10

PostPosted: Sun Jan 13, 2008 9:33 am    Post subject: Reply with quote

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
View user's profile Send private message
HAL9000



Joined: 16 Jan 2008
Posts: 1

PostPosted: Wed Jan 16, 2008 7:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group