Automating word entry with AppleScript - Umlauts

Hello

I’m sorry for the bad wording when I stated “So keystroke is localization agnostic, and keycode isn’t”: what I meant to say was that the right keycodes issued from keystroke would be given, without regard to the Localized keyboard, that is what nationality specific layout is currently used, (given that such a key for a character existed).

I thought that was a nifty way to say it, there is a lot of talk about agnosticisism these days, and I didn’t find it circumlocutional at all. :slight_smile:

Maybe having said that “the keystroke handler makes the character in question to be typed as an opaque entity, with regards to the national keyboard layout”, would have been better, but there you go, lot of typing. :slight_smile:

I buy Nigel’s explantion of how the keycode 0 gets into action perfectly well, with regards to my former theory of precomposed/decomposed characters. :slight_smile: But the clipboard does indeed translate the characters with umlauts and what have you into something edible by the keystroke handler. (Something that doesn’t return keycode 0)

Knowing that the keystroke will be sent to the frontmost application anyway, as I also neglected, is good to know.

It isn’t snowing today, so I’ll be out I think.

With a test script like the posted ones, explicitely triggering the process is superfluous but, in a true script, I trigger it because from time to time, I move the mouse so that the cursor enter and activate an other application window.
Such behavior would give odd result if the process is not explicitely triggerred. When it is, I never lost a character.

Yvan KOENIG (VALLAURIS, France) samedi 13 avril 2013 18:49:01