How to support this blog?

To support this blog, you can hire me as an OmegaT consultant/trainer, or you can send translation and project management jobs my way.

Search the site:

Random mail...

Sometimes a wifi service wants your mail to register on their service. Sometimes it's to grant you full access, sometimes it is just to give you a few minutes so that you get their confirmation mail and register.

In any case, you generally don't want to give your email to just about anybody. I was thinking of creating a random mail generator that creates  valid "enough" mails that they pass muster when you paste them in a mail field. Because sometimes, the few minutes you are granted to confirm that email are enough to just check your own mail and be done with the wifi access.


So, here it is.

------✂︎------✂︎------✂︎------✂︎------✂︎------

use scripting additions

global mailCharacters
set mailCharacters to ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]

set myName to myRandomString(10)
set myDomain to myRandomString(10)
set myExtension to myRandomString(3)

set myNewMail to myName & "@" & myDomain & "." & myExtension
set the clipboard to myNewMail

on myRandomString(n)
set myString to ""
set myLength to random number from 2 to n
repeat with i from 1 to myLength
set myString to myString & item (random number from 1 to length of mailCharacters) of mailCharacters
end repeat
end myRandomString

------✂︎------✂︎------✂︎------✂︎------✂︎------


The script creates something like:

[between 1 and 10 characters]@[between 1 and 10 characters].[between 1 and 3 characters]

and puts it into the clipboard so that you just have to run the script, and paste in the field where you need to put a mail.

It's pretty trivial, but it is just what I need.

Also, if you're a tad conscious about security, you should use a VPN over a free wifi, but that's another story.

OmegaT launcher in applescript

(updated on May 9 2021 with fixed links, etc.)

As a follow-up to a discussion on the OmegaT list*, I put my OmegaT launcher applescript on github:

https://github.com/brandelune/OmegaT-things/blob/master/%3EOmegaT.applescript

I'll write a more detailed post about that one later but it should be useable as is.

To test it, open it with Script Editor, select a valid OmegaT project in Finder, go back to Script Editor and click on Run (▶︎) or hit Cmd+R. You should see a dialog with 3 buttons and "Open Project" is selected ("Create Project" won't create a project for you because it calls code that I have not yet cleaned up, so you'll have to manually create a project, select it and then launch this script).

Clicking on it should launch Terminal, and from there OmegaT with a default command that looks like this by default:

java -Xdock:name=OmegaT -jar '/path/to/OmegaT.jar' '/path/to/project/' --no-team

Feel free to fiddle with the script and once you're satisfied with it, use File > Export and select "Application" as the file format. Then you can use it as a normal application to call it from Spotlight, etc.

There are plenty of TODOs in the file. I'm planning to slowly fill them with working code. If you have ideas, don't hesitate to make suggestions.


* After Didier Briel left the OmegaT project a few days ago, he asked me to take the role of "twitter community manager", and so I'm back into the OmegaT Project, after an 18 months lapse. Aaron Madlon-Kay is the new project manager. Don't hesitate to follow @OmegaTOfficial on Twitter if you don't already.

Popular, if not outdated, posts...

.docx .NET .pptx .sdf .xlsx AASync accented letters Accessibility Accessibility Inspector Alan Kay alignment Apple AppleScript ApplescriptObjC AppleTrans applications Aquamacs Arabic archive Automator backup bash BBEdit Better Call Saul bug Butler C Calculator Calendar Chinese Cocoa Command line CSV CSVConverter database defaults Devon Dictionary DITA DocBook Dock Doxygen EDICT Emacs emacs lisp ergonomics Excel external disk file formats file system File2XLIFF4j Finder Fink Font français Free software FSF Fun Get A Mac git GNU GPL Guido Van Rossum Heartsome Homebrew HTML IceCat Illustrator InDesign input system ITS iWork Japanese Java Java Properties Viewer Java Web Start json keybindings keyboard Keynote killall launchd LISA lisp locale4j localisation MacPorts Mail markdown MARTIF to TBX Converter Maxprograms Mono MS Office NeoOffice Numbers OASIS Ocelot ODF Okapi OLPC OLT OmegaT OnMyCommand oo2po OOXML Open Solaris OpenDocument OpenOffice.org OpenWordFast org-mode OSX Pages PDF PDFPen PlainCalc PO Preview programming python QA Quick Look QuickSilver QuickTime Player Rainbow RAM reggy regular expressions review rsync RTFCleaner Safari Santa Claus scanner Script Debugger Script Editor scripting scripting additions sdf2txt security Services shell shortcuts Skim sleep Smultron Snow Leopard Spaces Spanish spellchecking Spotlight SRX standards StarOffice Stingray Study SubEthaEdit Swordfish System Events System Preferences TBX TBXMaker Terminal text editing TextEdit TextMate TextWrangler The Tool Kit Time Capsule Time Machine tmutil TMX TMX Editor TMXValidator transifex Translate Toolkit translation Transmug troubleshooting TS TTX TXML UI Browser UI scripting Unix VBA vi Virtaal VirtualBox VLC W3C WebKit WHATWG Windows Wine Word WordFast wordpress writing Xcode XLIFF xml XO xslt YAML ZFS Zip