Last active
November 29, 2017 12:18
-
-
Save kokaruk/17239648021fd677268f16d7b25a93ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set clipdata to get the clipboard as text | |
set the clipboard to my change_case(the clipdata, "upper") | |
on change_case(this_text, this_case) | |
if this_case is "lower" then | |
set the new_text to do shell script "echo " & quoted form of (this_text) & " | tr A-Z a-z" | |
else | |
set the new_text to do shell script "echo " & quoted form of (this_text) & " | tr a-z A-Z" | |
end if | |
return the new_text | |
end change_case |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment