I am looking for a simple script to quick replace text accidentally written with Latin letters , instead of Greek ( It happens sooo often when replying mails at work...)
This script replace the Latin letters, one by one, with Greek ("; 1st step")
Of course the grammar , is not always correct, so I am trying to define another replacement pattern for partially handling grammar.
It it seems is not possible at "2nd step" to make the replacement.
Code: Select all
#SingleInstance, force
F1::
Clipboard := "" ; Empty the clipboard
Send, ^c
ClipWait, 0.5
; 1st step , 1 letter replacement
chars1 :={α:"[a]"
,υ:"[u]"
,τ:"[t]"
,ο:"[o]"
,κ:"[k]"
,ν:"[n]"
,ι:"[i]"
,τ:"[t]"
,"ο": "[o]"}
myString1 := Clipboard
For replace, find in chars1
myString1 := RegExReplace(myString1,find,replace)
; 2nd step, 2 letters replacement ; this step is not working
chars2 :={κι:"[ki]"
,νη:"[ni]" ; this is the part need to change at my provided test word
,"μη": "[mi]"}
For replace, find in chars2
myString2 :=RegExReplace(myString1,find,replace)
MsgBox %myString1% - %myString2%
Code: Select all
autokinito
Code: Select all
αυτοκινιτο
Code: Select all
αυτοκινητο