2011-03-27 65 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