| View previous topic :: View next topic |
| Author |
Message |
b.IT Guest
|
Posted: Thu Jun 05, 2008 4:46 pm Post subject: cHANGE cASE pOSSIBLE? |
|
|
Hi,
everbody knows this: you have accidently hit CapsLock, type away and end with as string like "cAPSlOCK"
what I would like to achieve is:
write a systemwide macro that gets the selected text from the active window (TextBox, RichText etc) and on STRG+CapsLock switch the casing of the selection.
Can this be done with autohotkey?
regards
b.IT |
|
| Back to top |
|
 |
Razlin
Joined: 05 Nov 2007 Posts: 340 Location: canada
|
Posted: Thu Jun 05, 2008 4:55 pm Post subject: |
|
|
Im sure it can be done
maybe something you can add to your day to day scripts is
| Code: | ~Capslock::
GetKeystate, capsState, Capslock, T
Progress, b fs18 zh0, % ((capsState = "D") ? ("CAPSLOCK ON") : ("Capslock Off")), , , Courier New
SoundBeep, 1000, 25
SoundPlay, *-1
sleep 500
Progress, Off
return |
will popup everytimd you hit the capslock key with a beep.
one beep is system speakers the other is headphones.
in case your headphones are off  _________________ -=Raz=- |
|
| Back to top |
|
 |
SoggyDog
Joined: 02 May 2006 Posts: 214 Location: Greeley, CO
|
Posted: Thu Jun 05, 2008 5:21 pm Post subject: |
|
|
I've been using this script for a long time;
It helps manage accidental caps locking and provides additional functions for changing case. _________________
SoggyDog
Download AutoHotKey Wallpaper
Does 'Fuzzy Logic' tickle? |
|
| Back to top |
|
 |
[VxE]
Joined: 07 Oct 2006 Posts: 1071
|
Posted: Fri Jun 06, 2008 3:03 am Post subject: |
|
|
| Code: | InvertStringCaps( string = "" )
{
Loop, parse, string
{
ac := Asc(A_LoopField)
newstring .= Chr(ac+(ac>64&&ac<91 ? 32 : (ac>96&&ac<123 ? -32 : 0)))
}
return newstring
}
msgbox % InvertStringCaps("~!@#$`%^&*()_+ A StUpId StRiNg ,./;[]\<>?:{}|1234567890-=") |
_________________ My Home Thread
More Common Answers: 1. It's in the FAQ 2. Ternary ( ? : ) guide 3. Post code with [code][/code] tags |
|
| Back to top |
|
 |
|