Samuel Murray's AutoIt Scripts

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:


Scripts specifically for OmegaT users

Autoskipper

autoskipper.zip

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.

Omtextract

omtextract.zip

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:

- CycleAll

For creating a TMX file with all strings in it, with identical source and target.

- ExtractTUs

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.

CycleAddNum

CycleAddNum.zip

This script adds numbers to all segments, so that they are all "unique".

Texttagrem

texttagrem.zip

This script removes all text except tags, or all tags except text.

Glosspaste

glosspaste.zip

This script helps you insert glossry items using keyboard shortcuts. This script only works with OmegaT 1.6x (not with 1.7x)

Autotranslate

autotranslate.zip

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".


Scripts useful in OmegaT and other programs

Omtaddterm

omtaddterm.zip
omtaddterm_utf8.zip (UTF-8 version)

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

Bulkfindreplace

bulkfindreplace.zip

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.


Scripts for use in other CAT tools

Transithack

transithack.zip

A method to translate Transit PE files if you prefer to use Wordfast's matching engine. Requires Wordfast and Transit, obviously.

Idiothack

idiothack.zip

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.

Idiot2desktop and Idiot2server

idiot2.zip idiot2big.zip (contains EXE files)

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.

Tageditornext

tageditornext.zip

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.

TradosTXT2PO.zip

TradosTXT2PO.zip

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.

Pootle-Addterm_1_2.zip

pootle-addterm_1_2.zip

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.

Swordnext

swordnext.zip

For Swordfish CAT tool, helps create a source=target document.

Tragic2PE

tragic2pe.zip

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.

Idiot2Yootype

idiot2yootype.zip

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.

Anypaste

anypaste.zip

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.


Various other scripts for various tasks

Snapshotter

snapshotter.zip

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")

Twoscroll

twoscroll.zip

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.

Zakey

Zakey.zip (v 0.2, fixed bug with uppercase caron S)

A free script for translators and users of the Venda and Sesotho language, for typing those difficult diacritical marks more easily.

FileEnum

FileEnum.zip

A file enumerator that prepends numbers to your files... but you select which files, one at a time.

Wikterma

wikterma.zip

Create bilingual word lists using Wikipedia's interwiki links.

ABBZZ

ABBZZ.zip

Bulk Scanner For ABBYY FineReader 8.0 Professional Edition. Requires ABBYY FineReader.

abbzz_HTM2TXT

abbzz_htm2txt.zip

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.

Checklines

checklines.zip

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.

Removestuff.zip

removestuff.zip

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.

Bommer and unbommer

bommer.zip

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

verbgetter.zip

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.

LilyEnter

lilyenter.zip

For onehanded typists who can't reach the E?TER or BACKSPACE key, an AutoHotKey script that turns the spacebar into a hotkey.

Sifilist

sifilist.zip

To invite more than one person at a time using a Mailman mailing list like the ones used for Sourceforge.net.


Scripts for use with the Translate Toolkit

Pofiltmerger

pofiltmerger.zip

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.

Pogrepper

pogrepper.zip

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.

Pozapper

pozapper.zip

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.

PoGreepie

pogreepie.zip

This script does pogrep on a PO file using a list of words from another file.

Moo2poo

moo2poo.zip

This script does msgunfmt (mo2po) on a number of files from a list.

DoDosDoo

dodosdoo.zip

This script creates a TMX file from a number of PO files, then translates a number of files using the TMX file.


Spell checkers for OmegaT

Kastrulspell

kastrulspell.zip

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.

Unxutilspell

unxutilspell.zip

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.

Spellcatcherspell

spellcatcherspell.zip

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.

Didierspell

didierspell.zip

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.

Tmxspeller

tmxspeller.zip

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.

Aspellspell

aspellspell.zip

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.


Old Trados documents

* omt2trados1

omt2trados1.zip

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).

* omt2trados2

omt2trados2.zip

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.

* omt2trados3

omt2trados3.zip

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.


Scripts that didn't cut it

* _tmextract

_tmextract.zip

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).

* _omtlauncher

_omtlauncher.zip

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.

* _prefschange

_prefschange.zip

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