What are the best way(s) to do it? Can ffi, RubyCocoa, or MacRuby do it?
It seems like CGEventCreateMouseEvent or CGPostMouseEvent (deprecated) can be used.
Please give a working example. thanks.
Update: the title of this question updated...