On Jun 25, 8:26 am, AJK <[EMAIL PROTECTED]> wrote: > Hello there! > > I've been googleing yet, and suppose it's hopeless to try, but better ask > it... > > I want to write a program which turns Cx to Ĉ, cx to ĉ et al WHILE > TYPING. (i.e. converting Esperanto x-system to real hats, for those > who know about this.) Therefore I though will need to capture the last > 2 typed characters (from any application), send a double backspace and > after that send the correct letters (back to the same application)... > > However, it seems inpossible to capture those letters, and maybe to > send them too... > > Or am I wrong? > > Greetings, > > LaPingvino > > (project:http://code.google.com/p/iksilo/- SVN Repository is free > viewable, project is GPL) > > -- > Ĉar Dio tiel amis la mondon, ke Li donis Sian solenaskitan Filon, por > ke ĉiu, kiu fidas al li, ne pereu, sed havu eternan vivon. > -Johano 3:16, La sankta Biblio- > > Ĝoju ĉiam, preĝu senĉese, pri ĉio donu dankon. > -1 Tesalonikanoj 5:16-18a, La sankta Biblio-
I've never done this before, but theoretically, you should be able to have a separate process monitor what you're typing and maybe do edits in real time. At least, I assume that that is how MS Word works. I have messed a little with sendkeys though. Here's the examples I found on the net: http://mail.python.org/pipermail/python-list/1999-May/003244.html http://aspn.activestate.com/ASPN/Python/Cookbook/Recipe/65107 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/4b032417-ebda-4d30-88a4-2b56c24affdd.asp The msdn one is just the MS docs for Sendkeys. One other alternative would be to type it all out and then run a script to parse your document and basically just do a search and replace. Hopefully that helps your out a little at least. Mike -- http://mail.python.org/mailman/listinfo/python-list