Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new function , drag mouse #15

Closed
wants to merge 4 commits into from
Closed

new function , drag mouse #15

wants to merge 4 commits into from

Conversation

JonaFly
Copy link

@JonaFly JonaFly commented Oct 21, 2019

No description provided.

@JonaFly JonaFly closed this Oct 21, 2019
@taojy123
Copy link
Owner

??你这是什么操作

@JonaFly
Copy link
Author

JonaFly commented Oct 21, 2019 via email

@taojy123
Copy link
Owner

但是你提交的代码里并没有实现 “拖动” 相关的功能啊

@JonaFly
Copy link
Author

JonaFly commented Oct 23, 2019 via email

@taojy123 taojy123 reopened this Jan 17, 2020
@kong1007
Copy link

反应一个问题,录制的时候无法新建文本文件,可能是只模拟点击操作,没有模拟鼠标移动操作的原因。导致右键的下一个目录无法显示导致无法点击新建文件的问题

@taojy123
Copy link
Owner

嗯嗯 是的 没有记录鼠标轨迹,你可以这样录制:
先点右键
鼠标移动到”新建“选项上,点一下左键
再点对应的新建项

@kong1007
Copy link

谢谢解答,还有一件事,就是快捷键问题,因为这软件无法实现录入要粘贴的文字(可能是我不知道),我选择新建一个文本,把要复制的编辑成一行一行,然后用快捷键Shift+↓来剪切一行,以达到分行复制黏贴的效果,但是这个Shift+↓貌似无法记录下来。

@taojy123
Copy link
Owner

理论上应该是能记录下来这种键盘操作的。方便的话你可以录制一个简单的测试脚本,内容为鼠标点击一下,然后 Shift+↓,然后鼠标再点一下。录制好以后把脚本的内容贴出来,我分析一下。

@kong1007
Copy link

kong1007 commented Apr 11, 2020

[
[0,"EM","mouse left down",[91,296]],
[125,"EM","mouse left up",[91,296]],
[2116,"EK","key down","shift"],
[580,"EK","key down","down"],
[94,"EK","key up","down"],
[1849,"EK","key up","shift"],
[6206,"EM","mouse left down",[150,324]],
[125,"EM","mouse left up",[150,324]]
]
从结果来看,貌似不把Shift+↓当作组合键,而是当作了分别按下Shift和↓
但我测试了ctrl+alt+del如下

[0,"EK","key down","ctrl_l"],
[0,"EK","key down","alt_l"],
[157,"EK","key down","delete"],
[0,"EK","key up","delete"],
[94,"EK","key up","alt_l"],
[47,"EK","key up","ctrl_l"],
[1567,"EK","key up","esc"]
这是正常的

@taojy123
Copy link
Owner

是的,按这里逻辑是先按下 shift,然后再按下 ⬇️,接着抬起 shift,最后抬起 ⬇️。理论上应该是能实现往下选一行的效果的。实际运行时情况咋样?光标有移动到下一行吗?

@kong1007
Copy link

光标有移动,但是没有选中

@taojy123
Copy link
Owner

我这里也重现出了这个问题。
这确实是个 bug,我建了了 issue,#27
后续的排查和处理都会记录在那里

@kong1007
Copy link

kong1007 commented Apr 13, 2020

谢谢采纳。

@taojy123
Copy link
Owner

taojy123 commented May 8, 2020

@Poachedegg
你好,一般来说脚本第 1 次跑和第 n 次跑,应该是完全一致的。
你提到的这种情况还真没遇到过。方便提供一个可以重现你说描述的问题的,最小规模的脚本吗?

@taojy123
Copy link
Owner

taojy123 commented May 8, 2020

@Poachedegg 这个偏移的比例一致,很像是屏幕缩放比例的问题。
你可以再确认一下:

  • win10系统设置里,缩放与布局 选着的缩放比例
  • 录制脚本时,软件上填写的 屏幕缩放
  • 脚本运行时,软件上填写的 屏幕缩放
    这三处是否完全一致。

@taojy123
Copy link
Owner

哈哈,厉害,信息不用删哈,这是很好的踩坑经历😄

@taojy123 taojy123 closed this Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants