robot 拖动,Java Robot类模拟人类鼠标移动

在远程控制项目中,通过从客户端发送光标坐标到服务器,实现鼠标的模拟移动。目前使用`robot.mouseMove(x,y);`仅能瞬间移动到指定位置,而非连续移动。已找到一个简单的算法来模拟持续移动,但效果仍不理想。寻求更接近人类行为的鼠标拖动实现方式,考虑因素包括:手部自然弧线运动、方向校正、速度变化等。" 125207141,5689052,餐饮业电子招采解决方案:8Manage系统助力节省成本,"['电子招采', '餐饮供应链', '成本控制', '供应链管理软件', '大数据分析']
摘要由CSDN通过智能技术生成

I am working on a project about remote control, send conrdinate x and y of cursor from client to server.

But

robot.mouseMove(x,y);

will only move the cursor to the particular point without moving the cursor form origional point

I have find this simple algorthim to simulate the continuing movement of mouse

for (int i=0; i<100; i++){

int x = ((end_x * i)/100) + (start_x*(100-i)/100);

int y = ((end_y * i)/100) + (start_y*(100-i)/100);

robot.mouseMove(x,y);

}

But this algorthim still too simple, it just move from one point to other point slowly, which still unlike human behave.

I have read some open soruce code about remote control from web, and I find this project

http://code.google.com/p/java-remote-control/

is using the method call MosueMovement from Mou

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值