Programatically Accessing Koteri's Functionality

  • Sorry if this is over posted, but I'm having some difficulty wrapping
    my head around the API here.
    I want to take advantage of existing Kotoeri functionality on a text
    First, I need to be able to select the text programatically, as in
    all of the text in a file, or broken by white space characters.
    Then, with that text selected I want to run Kotoeri's
    'KotoeriMenuCommand_RetreiveFixedYomi" menu item with the key codes:
    # KeyCode ------->  Y
    # Modifier ------>  10
    # ModifierMask -->  27
    on the text.
    The goal is to generate what is sometimes called Ruby Text to aid in
    reading. (in Japanese it is referred to as Furigana)
    I believe I can work out the layout and generation of a new file.
    What I don't know how to do, is call this menu command programatically.
    Should this be done by AppleScript via some Apple Event,  or a Cocoa
    or Carbon method/function ?
    Is there an API that I am missing ?
    Is there some way to simply send this combination of key codes
    programatically so that Kotoeri is the responder? ... and then
    capture it's resulting output somewhere?
    The docs I've looked at on TSM and Key Events and so on are really
    making me feel dumb at this point.
    Again, sorry for the noise if this is an over-post, but if anybody
    has any insight on this, it would be greatly appreciated.
previous month december 2007 next month
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today