Created
March 10, 2026 23:18
-
-
Save cmj/18c72a32b6f8063eccd4ea5216e27173 to your computer and use it in GitHub Desktop.
Drag mouse in circles on https://paveldogreat.github.io/WebGL-Fluid-Simulation/
This file contains hidden or 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
| #!/bin/bash | |
| echo "move mouse over window" | |
| sleep 4 | |
| cx=3500 # center X | |
| cy=1600 # center Y | |
| r=300 # radius | |
| step=7 # degrees per step | |
| circles=4 # | |
| xdotool mousedown 1 | |
| for((i=1;i<=$circles;i++)); do | |
| for ((a=0; a<360; a+=step)); do | |
| x=$(awk -v cx=$cx -v r=$r -v a=$a 'BEGIN{printf "%d", cx + r*cos(a*3.14159/180)}') | |
| y=$(awk -v cy=$cy -v r=$r -v a=$a 'BEGIN{printf "%d", cy + r*sin(a*3.14159/180)}') | |
| xdotool mousemove $x $y | |
| # random click ~10% chance | |
| #if (( RANDOM % 10 == 0 )); then | |
| # xdotool click 1 | |
| #fi | |
| sleep 0.01 | |
| done | |
| done | |
| xdotool mouseup 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment