Apple Events to Control Mouse Remotely

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 05:28:21

This will probably involve writing a device driver and pretending to be a mouse.

As I understand it, you can use Distributed Objects to pass the Apple Events along.

They can work across the network via Bonjour. You could serialise or encode an Apple Event pass it across the network then have a helper app running on the machine at the other end to listen for, decode the Event and run it. You may just want to encode the coordinates of the mouse click for simplicity.

I also believe Marcus Zarra's book on Core Data has the sample code for a Core Data app running over a network which uses DO. You might be able to see what he's done and do something similar to get you started. See also this excellent Q&A on DO by Mike Ash.

the "System Events" "application" (just a process in reality) allows to send events using applescript:

tell application "System Events"
tell process "Finder"
click at {10, 10}
end tell
end tell

I'm going answer out of the box, and suggest you try Synergy, as it sounds like what you are looking for. If not, since it's open source code taking a look at it might give you an idea on how to proceed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!