Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
9
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
dogtail
dogtail
Commits
f928ccf1
Commit
f928ccf1
authored
Feb 22, 2019
by
Michal Odehnal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mouse_delay in dragWithTrajectory
parent
c2c1ef0d
Pipeline
#48776660
failed with stages
in 0 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
dogtail/rawinput.py
dogtail/rawinput.py
+2
-2
No files found.
dogtail/rawinput.py
View file @
f928ccf1
...
...
@@ -160,7 +160,7 @@ def drag(fromXY, toXY, button=1, check=True):
doDelay
()
def
dragWithTrajectory
(
fromXY
,
toXY
,
button
=
1
,
check
=
True
):
def
dragWithTrajectory
(
fromXY
,
toXY
,
button
=
1
,
check
=
True
,
mouse_delay
=
0.01
):
"""
Synthetize a mouse press, drag (including move events), and release on the screen
"""
...
...
@@ -170,7 +170,7 @@ def dragWithTrajectory(fromXY, toXY, button=1, check=True):
press
(
x
,
y
,
button
,
check
)
(
x
,
y
)
=
toXY
absoluteMotionWithTrajectory
(
fromXY
[
0
],
fromXY
[
1
],
x
,
y
,
check
=
check
)
absoluteMotionWithTrajectory
(
fromXY
[
0
],
fromXY
[
1
],
x
,
y
,
mouseDelay
=
mouse_delay
,
check
=
check
)
doDelay
()
release
(
x
,
y
,
button
,
check
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment