Here are some tools I've written using AutoIt.
If you don't have AutoIt installed, I sometimes include an EXE file that can also be run. If you have AutoIt installed, you can also modify the scripts. Remember to run the AU3 file and not the EXE file when you modify the script.
Useful programs used in my scripts:
Index of scripts:
This script automatically skips a segment if a certain set of characters occur in it. The compiled script searches for "[[" or "]]", but you can customise it. Included is a script for autoskipping Trados uncleaned segments, to be used in OmegaT.
Usage: Run OmegaT, have "Tab to advance" enabled, run the script, and use Ctrl+ENTER to move to the next segment.
These are two scripts to extract all source text from the project files into a single, large text file. This is useful for sharing text with translators who may not be using OmegaT, or for doing all sorts of lexicographic stuff with the text (eg using word frequency lists to create glossaries). The two scripts are:
For creating a TMX file with all strings in it, with identical source and target.
For creating a plaintext file with all strings in it. Each string is separated from the next using two newlines (in other words, there is an open line between the segments).
Usage: Run OmegaT, run the script, and follow the prompts.
This script adds numbers to all segments, so that they are all "unique".
This script removes all text except tags, or all tags except text.
This script helps you insert glossry items using keyboard shortcuts. This script only works with OmegaT 1.6x (not with 1.7x)
This is the simplest autotranslation script in my group. It basically pressed "next segment" all the way to the bottom of your project. Useful if you want a project "pretranslated".
With this script, you can easily add terms to a glossary while you translate in OmegaT. You can even add terms to a glossary currently used by OmegaT. Unfortunately, the new terms won't be recognised in OmegaT until you've reloaded the project. Incidently, the script works in all programs (so you can add a source term from OmegaT but add its target term from eg a web site).
Usage: Run the script, mark the source term, press Alt+Ctrl+T, mark the target term, press Alt+Ctrl+Y, edit the term in the popup box, and continue.
See also pootle-addterm_1_2.zip further down
Want to do find/replace on a TMX file, but afraid that you might accidently replace something in the source text too? This script interacts with jEdit to do find/replace in the target text of a TMX file. Included is also a description of how to do this without using the script.
Requires: jEdit. Usage: Run jEdit, open the TMX file in it, run the script, and follow the prompts.
A method to translate Transit PE files if you prefer to use Wordfast's matching engine. Requires Wordfast and Transit, obviously.
A method to t?anslate Idiom WorldServer Desktop files if you prefer to use Wordfast's matching engine. Requires Idiom and Wordfast, obviously. Very convoluted... use Idiot2desktop instead.
These two scripts paste a translation into Idiom Desktop and Idiom Worldserver. Useful if you do your translation in Wordfast or some other tool like OmegaT. I haven't tried it but I wouldn't be surprised if you can use an altered version of this script on Transit too. Requires Idiom and a CAT tool, obviously. Well, you can use the webbased Idiom.
This script creates a bilingual untranslated TTX file from a monolingual untranslated one. Useful if you translate TTX files in Wordfast or something else. Requires a demo version of Trados TagEditor.
This little script converts a Trados TXT TM into PO format. Well, I can't remember if it ever worked (but I think it did). You don't need Trados... all you need is the TXT TM.
Add terms to the Pootle glossary in real time, if you're running Pootle on Windows as root. Now with comment support. Well, you can use this with any program, but it writes a PO file, not a CSV file.
For Swordfish CAT tool, helps create a source=target document.
This script reads one line at a time from a text file, and pastes that line into Transit PE. Your job is to go "Num+Plus" to move to the next segment.
This script reads one line at a time from a text file, and pastes that line into Idiom. In Idiom, it basically goes "paste" and the "down" to the next line.
Press Alt+L or Alt+K to paste one line at a time from a file named text.txt. Dead simple. Assumes file is UTF8.
A script for taking snapshots of web pages online or offline. Useful for betatesting a localised web site -- just load a list of all possible URLs into it, and run it, and then review all the snapshots for visual errors.
Requires: * K-HTM2BMP (google for "khtm2bmp.exe")
A script that helps you proofread two documents on screen by pressing "down" in the second document for you, when you press "down" in the first one. Two versions, one more useful and more buggy than the other.
A free script for translators and users of the Venda and Sesotho language, for typing those difficult diacritical marks more easily.
A file enumerator that prepends numbers to your files... but you select which files, one at a time.
Create bilingual word lists using Wikipedia's interwiki links.
Bulk Scanner For ABBYY FineReader 8.0 Professional Edition. Requires ABBYY FineReader.
Do HTM2TXT en masse, without breaking the text at ends of lines. The script assumes you don't want to copy the entire file's content, but only the main content box (not the menus etc), but you can change it if that is in fact what you want. Perfect for large alignments. An older version is here. Requires a good browser, like FireFox, and Babelpad.
Warning: HTM2TXT doesn't really work, because those idiots who designed FireFox couldn't *think* straight enough to give context menu items the same keyboard shortcut regardless of context... this means that sometimes the script will press the wrong shortcut because the context is different. What would be really great is if the author of the Firefox extension "Table2clipboard" could add keyboard shortcuts (I mean, accellerators) to his menu items.
This script attemps to check whether files in one list have the same number of lines per pair than the files in another list. Useful for checking if your text extraction has gone smoothly before doing an alignment.
This script attempts to remove tabs, double spaces and double blank lines in multiple files. It makes backup copies of files that it edits. If you edit it, you can also use it to remove or find/replace other characters.
Adds a BOM (byte order mark) or removes the BOM of a whole bunch of files. Useful for working with Linux files on Windows or vice versa, especially UTF8. Requires a hex editor XVI32.
Verbgetter works with one of Kevin's word lists, but I can't remember which. It is a tagged word list but all the words are all there... so to extract only verbs, this script should do it. I can't remember if the script was ever a success. I think I only ever got verbs with it.
For onehanded typists who can't reach the E?TER or BACKSPACE key, an AutoHotKey script that turns the spacebar into a hotkey.
To invite more than one person at a time using a Mailman mailing list like the ones used for Sourceforge.net.
To automate pofilter and pomerge in such a way that you can drag and drop the files. Warning... I've since learned that this script really only work if your PO project is 1 file big. It doesn't work for bigger projects.
To automate pogrep and pomerge in such a way that you can drag and drop the files. Warning... I've since learned that this script really only work if your PO project is 1 file big. It doesn't work for bigger projects.
To automate pofilter to create PO files with fuzzies only and untranslateds only (unwrapped). The script does not do POT2PO -- you have to do that yourself. Warning... I've since learned that this script really only work if your PO project is 1 file big. It doesn't work for bigger projects.
This script does pogrep on a PO file using a list of words from another file.
This script does msgunfmt (mo2po) on a number of files from a list.
This script creates a TMX file from a number of PO files, then translates a number of files using the TMX file.
This script spell-checks each segment in Kastrul directly after the user moves to the next segment. Kastrul basically outputs a list of misspelt words, but it is very easy to create your own spelling dictionaries for it.
Requires: Kastrul. Usage: Run OmegaT, have "Tab to advance" enabled, run the script, run Kastrul. Use Ctrl+ENTER to spell-check the current segment, or to get back to OmegaT to edit the segment.
This script spell-checks each segment using three UnxUtils tools, but it mimicks the way Kastrulspell works.
Requires: three UnxUtils tools. Usage: see enclosed file.
This script spell-checks each segment using Spellcatcher. I can't remember how it works, but I know it did work.
Requires: Spellcatcher (not freeware). Usage: see enclosed file.
This script can be used for spell-checking or for machine translation or for Google searches etc. I haven't tested it in a long time.
Requires: a file called myfile.bat, in which whatever is defined.
This isn't an AutoIt script, but a method for spell-checking a TMX file in MS Word. Included is a macro, an MS Word document with tw4winExternal style in it, and a readme file.
This method with script was originally written in AutoIt v2, but I've rewritten it in Au3 and compiled it. It was also originally written for an earlier version of OmegaT, so you may have to tinker with it (or with the instructions). The misspelt words are displayed in an MS DOS window.
Requires: Winkey, Aspell. Usage: Run OmegaT, run Winkey, open an MS DOS window and go to the right directory and change the prompt to nothing, and then use Winkey-ENTER to move to next segments.
This is a longwinded description of how to use OmegaT to translate Trados uncleaned documents. It is fairly comprehensive, and includes a few macros. Theoretically, all things being perfect, you should be able to take an MS Word file and produce a translated Trados uncleaned file, using only free tools. Read it inconjuction with omt2trados3 (which contains the segmentation rules necessary to translate uncleaned files in OmegaT).
This is an older description of how to use OmegaT to translate Trados uncleaned documents. It includes a script, but I really can't vouch for it.
This is possibly the newest description of how to use OmegaT to translate Trados uncleaned documents. It includes the OmegaT segmentation rules to be used for Trados files.
This is a very complicated script that works only on my computer. It does the same as Omtextract, except that it attempts to get some of the information automatically (Omtextract prompts the user for the information).
This is a very complicated script that works only on my computer. It is meant for launching OmegaT from the commandline, launching projects into OmegaT from the commandline, and launching projects into OmegaT using drag-and-drop.
This isn't a complicated script, but it rather depends on your installation of OmegaT. It attempts to replace your OmegaT prefs file with one located in the script directory. It also creates a backup of your existing prefs file. Usage: Close OmegaT, put your preferred prefs file in the same directory as the script, and run the script.
Samuel Murray
2006