I'm pretty sure this can be done, but I don't know how! Let's say I'm translating from English to Spanish. What I would like to do is when I mark a word, let's say I mark the word "friend", it would be automatically replaced by "amigo" when I press a hotkey. The translation program I'm using "forces me" to do one sentence at a time, so the normal replace function will do no good.
Even better would be if it scans the sentence for known terms (upon pressing a hotkey) and automatically replaces them. Any ideas?
AHK as a translation assisting tool, replacing words
Started by
Sieceres
, Jul 02 2008 08:42 AM
3 replies to this topic
#1
-
Posted 02 July 2008 - 08:42 AM
MyDictionary.txtEven better would be if it scans the sentence for known terms (upon pressing a hotkey) and automatically replaces them. Any ideas?
friend|Freund BoBo|BoBo colleague|Kollege Run|Ausführen Cancel|Abbrechen Start|Start Subject|Titel
FileRead, Content, My.txt ; Text to translate Loop, Read, MyDictionary.txt { StringSplit, Word, A_LoopReadLine, | StringReplace, Content, Content, %Word1%, %Word2%, All ClipBoard := Content ; keep changed text } FileAppend, %Content%`n, MyTranslatedFile.txt Run, Notepad MyTranslatedFile.txt,, MaxNot tested & and not exactly what you want, but should give you an idea ... 8)
#2
-
Posted 02 July 2008 - 09:01 AM
I tested it, but didn't get it to work... The "translated document" is empty. This is too advanced for me to correct.
#3
-
Posted 23 July 2008 - 08:42 AM
Did you put a file called My.txt with the text to be translated in the directory with the script?
#4
-
Posted 23 July 2008 - 08:58 AM