maybe timing issue?
I know I've used ffi to simulate keyboard stroke before:
https://github.com/ffi/ffi/wiki/Windows-Examples

-- 
Posted via http://www.ruby-forum.com/.