2011-03-27 66 views

回答

1

在MacRuby的你的意见可以捕获这些事件。只需查看MacRuby附带的DotView示例。

class MyView < NSView 
    def mouseUp event 
    puts convertPoint(event.locationInWindow, fromView:nil) 
    end 
end 
+0

对不起,我的意思是写一个程序点击屏幕上的一个点 – 2011-03-27 10:30:03

+0

啊,好的。幸运的是,有一个例子: https://github.com/juanger/fvClicker/blob/master/WebClickerController.rb – 2011-03-30 06:49:55