Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想创建一个模拟各种用户的应用程序,但我需要这个“幽灵”用户在键盘上键入,如何在 Ruby 上模拟按键和 keyrealease 事件?
Java 有一个名为 Robot(我认为)的类,它模拟了类似的东西。你可以使用 JRuby 来调用它。我曾经在某个地方有过一些测试脚本,当我找到它时我会发布它..但我记得用那个类做这件事真的很简单,你甚至可以移动光标,真的很有趣很难。