so i was looking for a way to capitalize first letter of a sentence after a period. and found out this Topic, and this script on it
Code: Select all
#NoEnv
#SingleInstance Force
str = he left me. she is: they are, he.
MsgBox, % new := RegExReplace(str, "^\w|(?:\.|:)\s+\K\w", "$U0")
; Output:
; He left me. She is: They are, he.
Code: Select all
#NoEnv
#SingleInstance Force
; Get the text from the clipboard
Clipboard := ""
Loop, 5 {
ClipWait, 1
If !ErrorLevel
Break
}
; Apply the RegExReplace function to the clipboard text
new := RegExReplace(Clipboard, "^\w|(?:\.|:)\s+\K\w", "$U0")
; Show the modified text in a message box
MsgBox, % new
so i toyed more with the code and result is this:
Code: Select all
#NoEnv
#SingleInstance Force
; Get the text from the clipboard
Clipboard := ""
Loop, 5 {
ClipWait, 1
If !ErrorLevel
Break
}
; Apply the RegExReplace function to the clipboard text
new := RegExReplace(Clipboard, "^\w|(?:\.|:)\s+\K\w", "$U0")
; Send the modified text to the active window
Sleep 1000 ; Wait for 1 second to switch to the chat window
SendInput, % new
script to make it change first letter in sentence after i hit period to capital.
Example:
hello how are you.
result after i clicked (.) :
Hello how are you.
Thanks for reading !
Summary:
So, I need help in creating a script that will automatically capitalize the first letter in a sentence after I hit the period without having to copy and paste the text and in real time. i don't mind if it's on v1 or v2. Thanks for reading !