开发者

Sending key stroke to front application in Cocoa?

I was wondering would this be hard to do; I have a barcode reader for my isight (mac webcam) (evoBarcode). At the moment, the program reads the barcode fine and adds it to a text field at the side of the application. Event when in the background, the application continues to run and read barcodes which is fine.

开发者_开发技巧

I was wondering, is it easy to send the result from this (I have already located the exact variable where the barcode is caught) to the front application as a keystroke? (the front application being textEdit or something.

I've tried searching around for a bit and found CGRemoteOperation, but havn't found a great lot of resources or examples on it.

Any ideas?

Thanks.


Depending on the reader behaviour another option could be to implement a service menu item. That way you don't mess with the clipboard.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜