Ich suche nach einer Chrome-Erweiterung, die mit einer Tastenkombination Text in Groß- und Kleinschreibung umwandeln kann und umgekehrt.
Zum Beispiel:
. DIES IST EIN BEISPIELTEXT
umgestellt werden soll
.Dies ist ein Mustertext
Anforderungen:
.
als Großbuchstaben (für einen Satz)HINWEIS: Ich suche nicht danach, um den Text in der Zwischenablage zu konvertieren. Ich suche nach einer Lösung, die mit dem ausgewählten Text in einem Textfeld/Textbereich auf einer Website funktioniert .
Ein Skript , um es mit AutoHotkey (Skriptsprache für die Desktop-Automatisierung unter Windows) zu tun, falls es in Ordnung ist, nicht nur Browser zu sein:
CTL+ALT+k - Sentence case (what you asked for)
CTL+L - convert to lowercase
CTL+U - convert to uppercase
CTL+K - invert the case (e.g. "The Big Dog" becomes "tHE bIG dOG")
SHIFT+CTL+K - convert to capitalized (e.g. "the big dog" becomes "The Big Dog")
SHIFT+CTL+U - convert to sentence case
Code:
!^k:: ; Sentence case
StringLower, Clipboard, Clipboard
Clipboard := RegExReplace(Clipboard, "((?:^|[.!?]\s+)[a-z])", "$u1")
Send %Clipboard%
RETURN
^u:: ; Convert text to upper
StringUpper Clipboard, Clipboard
Send %Clipboard%
RETURN
^l:: ; Convert text to lower
StringLower Clipboard, Clipboard
Send %Clipboard%
RETURN
+^k:: ; Convert text to capitalized
StringUpper Clipboard, Clipboard, T
Send %Clipboard%
RETURN
^k:: ; Convert text to inverted
Lab_Invert_Char_Out:= ""
Loop % Strlen(Clipboard) {
Lab_Invert_Char:= Substr(Clipboard, A_Index, 1)
if Lab_Invert_Char is upper
Lab_Invert_Char_Out:= Lab_Invert_Char_Out Chr(Asc(Lab_Invert_Char) + 32)
else if Lab_Invert_Char is lower
Lab_Invert_Char_Out:= Lab_Invert_Char_Out Chr(Asc(Lab_Invert_Char) - 32)
else
Lab_Invert_Char_Out:= Lab_Invert_Char_Out Lab_Invert_Char
}
Send %Lab_Invert_Char_Out%
RETURN
Beispiel:
dvfv dKMLM sdf. sdf SDFKLMSF sdf.
->Dvfv dkmlm sdf. Sdf sdfklmsf sdf.
Aufbauend auf Francks AutoHotKey-Antwort, hauptsächlich von here , ist dieses Skript:
#d:: ConvertSentence()
ConvertSentence()
{
clipSave := Clipboard
Clipboard = ; Empty the clipboard so that ClipWait has something to detect
SendInput, ^c ;copies selected text
ClipWait
StringReplace, Clipboard, Clipboard, `r`n, `n, All ;Fix for SendInput sending Windows linebreaks
StringLower, Clipboard, Clipboard ;Convert case
Clipboard := RegExReplace(Clipboard, "(((^|([.!?]+\s+))[a-z])| i | i')", "$u1")
Len:= Strlen(Clipboard) ;Set number of characters
Send %Clipboard% ;Send new string
Send +{left %Len%} ;Re-select text
VarSetCapacity(OutputText, 0) ;free memory
Clipboard := clipSave ;Restore previous clipboard
}
WindowsWenn Sie + drücken D, wird der ausgewählte Text in Groß- und Kleinschreibung umgewandelt.
Leider ist AutoHotKey nur für Windows, daher funktioniert dies nicht auf allen Plattformen in Chrome!
Nick Dickinson-Wilde
Nick Dickinson-Wilde
ᔕᖺᘎᕊ
ᔕᖺᘎᕊ