1 guest@cc 2021-07-02T09:09:06 [ImgOps] [iqdb]
(JPEG, 69.4KB, 525x393)
Need some help on shell scripting. Could you help me how to make this code better?
xdotool mousemove 847 223 click 1 | sleep 0.1
xdotool mousemove 30 733 click 1 | sleep 0.1 | xdotool mousemove 30 733 click 1
xclip -t -selection "primary" -quiet -silent > /dev/null 2>&1
The thing about this script is, it doesn't work for the first run. Instead of echoing the real value, I got 1. But after do the second run, the value is correct as intended. "xclip" is a program equivalent to Ctrl+C and Ctrl+V where you can save selected line into clipboard for X11. If it tries to copy new value than before, same symptom happened. It always when running on the second time that works.