-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97dbf4c
commit dfb55cf
Showing
3 changed files
with
78 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,44 @@ | ||
#!/bin/bash | ||
|
||
xdotool mousemove --sync 500 500 | ||
xdotool mousedown 1 | ||
# Set these according to screen size and element positions | ||
panning_start_x=884 | ||
panning_start_y=400 | ||
recording_button_x=1683 | ||
recording_button_y=161 | ||
n_mousemove=20 # Mouse-movements per panning | ||
panning_repetitions=5 | ||
|
||
# Alt+Tab to the browser window | ||
xdotool key Alt+Tab | ||
sleep 0.5 | ||
|
||
# Start recording in devtools | ||
xdotool mousemove --sync $recording_button_x $recording_button_y | ||
xdotool click 1 | ||
sleep 0.5 | ||
|
||
num_iterations=20 | ||
|
||
for ((i = 0; i < num_iterations; i++)); do | ||
xdotool mousemove --sync $panning_start_x $panning_start_y | ||
xdotool mousedown 1 | ||
for ((j = 0; j < panning_repetitions; j++)); do | ||
|
||
sleep 0.025 | ||
xdotool mousemove_relative --sync 20 20 | ||
for ((i = 0; i < n_mousemove; i++)); do | ||
|
||
sleep 0.025 | ||
xdotool mousemove_relative --sync 0 20 | ||
done | ||
for ((i = 0; i < n_mousemove; i++)); do | ||
|
||
sleep 0.025 | ||
xdotool mousemove_relative --sync -- 0 -20 | ||
done | ||
done | ||
xdotool mouseup 1 | ||
|
||
|
||
xdotool mouseup 1 | ||
# Stop recording in devtools | ||
xdotool mousemove --sync $recording_button_x $recording_button_y | ||
xdotool click 1 | ||
|
||
# Alt+Tab back to the terminal | ||
xdotool key Alt+Tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# Set these according to screen size and element positions | ||
zoom_x=884 | ||
zoom_y=670 | ||
recording_button_x=1683 | ||
recording_button_y=161 | ||
delay=50 # In ms, between scroll ticks | ||
repetitions=50 | ||
|
||
# Alt+Tab to the browser window | ||
xdotool key Alt+Tab | ||
sleep 0.5 | ||
|
||
# Set initial mouse position | ||
xdotool mousemove --sync 737 558 | ||
|
||
delay=20 | ||
repetitions=600 | ||
# Start recording in devtools | ||
xdotool mousemove --sync $recording_button_x $recording_button_y | ||
xdotool click 1 | ||
sleep 0.5 | ||
|
||
# Set zoom mouse position | ||
xdotool mousemove --sync $zoom_x $zoom_y | ||
xdotool click --repeat $repetitions --delay $delay 4 | ||
|
||
# Stop recording in devtools | ||
xdotool mousemove --sync $recording_button_x $recording_button_y | ||
xdotool click 1 | ||
|
||
# Alt+Tab back to terminal | ||
xdotool key Alt+Tab |