简体   繁体   English

使用 Chrome 控制台的鼠标位置脚本 (javascript)

[英]Mouse position script using Chrome console ( javascript )

how can i make a script for Chrome console, to stimulate the mouse going to 2 points in a infinite loop我如何为 Chrome 控制台编写脚本,以在无限循环中刺激鼠标移动到 2 个点

For example to move the mouse the point A then point B (after 100ms) , then point A again,point B and repeat .例如将鼠标移动 A 点然后 B 点(100 毫秒后),然后再次点 A,点 B 并重复。

Is this thing even possible ?这件事甚至可能吗?

browser-javascript is unable to control your mouse position, and that is with good reason: imagine if any website could just take control of your mouse. browser-javascript 无法控制您的鼠标位置,这是有充分理由的:想象一下是否有任何网站可以控制您的鼠标。

however, you could just write a script in a desktop application, with a language such as python or ruby.但是,您可以在桌面应用程序中使用 python 或 ruby​​ 等语言编写脚本。 or if u really want to use JS you could use nodejs to control the mouse, but it simply cant run in the browser或者如果你真的想使用 JS 你可以使用 nodejs 来控制鼠标,但它根本无法在浏览器中运行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM