Skip to content

Instantly share code, notes, and snippets.

@jasondavis
Forked from davebrny/change case.ahk
Created April 2, 2023 04:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasondavis/b5478b4708fe161b4aad22b7ddb74aae to your computer and use it in GitHub Desktop.
Save jasondavis/b5478b4708fe161b4aad22b7ddb74aae to your computer and use it in GitHub Desktop.
(autohotkey) - change the case of selected text
!u::goSub, set_upper_case
!l::goSub, set_lower_case
!t::goSub, set_title_case
set_upper_case:
set_lower_case:
set_title_case:
revert_clipboard := clipboardAll
clipboard =
send ^{c}
clipWait, 0.3
if (a_thisLabel = "set_upper_case")
stringUpper, clipboard, clipboard
else if (a_thisLabel = "set_lower_case")
stringLower, clipboard, clipboard
else if (a_thisLabel = "set_title_case")
stringLower, clipboard, clipboard, T
send ^{v}
sleep 50
clipboard := revert_clipboard
return
/*
[script info]
version = 1.2
description = change the case of selected text
author = davebrny
source =
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment