算法来模拟鼠标移动作为一个人呢? [英] Algorithm to emulate mouse movement as a human does?

查看:806
本文介绍了算法来模拟鼠标移动作为一个人呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要测试把一些鼠标的移动称为手势软件。对于这样的任务,我需要模拟从A点鼠标移动到B点,而不是直线,而是作为一个真正的鼠标移动 - 具有曲线美,有点jaggedyness等是否有任何可用的解决方案(算法/ code本身,而不是一个库/ EXE),我可以使用?

I need to test a software that treats some mouse movements as "gestures". For such a task I need to emulate mouse movement from point A to point B, not in straight line, but as a real mouse moves - with curves, a bit of jaggedyness etc. Is there any available solution (algorithm/code itself, not a library/exe) that I can use?

当然,我能自己写一些简单的正弦曲线的数学,但是这将是一个人的手引领鼠标的一个非常原始的模拟。也许,这样的任务已经解决已经无数次,而且我可以借用现有的code? :)

Of course I can write some simple sinusoidal math by myself, but this would be a very crude emulation of a human hand leading a mouse. Perhaps such a task has been solved already numerous times, and I can just borrow an existing code? :)

推荐答案

看看的的 Mouse.simba 文件,该文件是 SRL框架的一部分,设计了一个宏观的计划,与在线游戏一样在RuneScape 工作。在RuneScape有广泛的宏观检测功能,因此已开发了SRL框架的所有部分看作为人类越好 - 尤其是鼠标功能

Take a look at the Mouse.simba file which is part of the SRL Framework, a macro program designed to work with online games like Runescape. Runescape has extensive macro detection capabilities so all parts of the SRL Framework have been developed to look as human as possible - the mouse functions in particular.

在code是帕斯卡,但应该是很容易阅读。看 MMouse()通过BenLand100程序它的动作非常逼真地做先进的动作像循环和超调的目标,以及不断变化的加速度和方向(现在也有笔记本电脑的触摸板式运动)。如果你想测试它,你需要下载 SIMBA 和的启用SRL-包括的。

The code is in Pascal but should be quite easy to read. Look at the MMouse() procedure by BenLand100 it moves very realistically doing advanced movements like loops and overshooting its target as well as continuously varying accelerations and directions (also now has laptop touchpad type movements). If you want to test it you'll need to download SIMBA and enable the SRL-include.

这篇关于算法来模拟鼠标移动作为一个人呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆