OpenStreetMap 标志 OpenStreetMap

Bash Scripting & mapwith.ai

PhysicsArmature 于 2020年四月27日 以 English 发布 最后一次更新于2022年一月 4日。

Problem:

I need to slap down one set of 50 houses. I want to click as few things as possible. Script 1 is about this task. Script 2 is about finding the coordinates of things on your screen.

Notice: Eliminate [] before the pound sign, I needed to differentiate kramdown and BASH code. Notice 2: I have this weird spacing, otherwise journal system tries to turn a script into a paragraph.

SCRIPT 1

[]#!/bin/bash

[]#pull up script

sleep 4

[]#0.1 is to fast

for i in {1..49}

do

echo -e $i

[]#Find a house and click on it yourself

[]#Go to xy of use this feature xxxyyy

sleep 1.8

xdotool mousemove 35 243 click 1 &

[]#Go to xy of change this feature

sleep 0.3

xdotool mousemove 53 211 click 1 &

[]#Go to xy of option 1 house

sleep 0.3

xdotool mousemove 51 276 click 1 &

done

echo DONE

SCRIPT 2

[]#!/bin/bash

[]#pull up script

sleep 5

for i in {1..200}

do

xdotool getmouselocation –shell

eval $(xdotool getmouselocation –shell)

echo $X $Y

sleep 5

done

Works used:

https://stackoverflow.com/questions/8480073/how-would-i-get-the-current-mouse-coordinates-in-bash https://askubuntu.com/questions/179581/how-can-i-make-my-mouse-auto-click-every-5-seconds

Potential future targets for when I have time (Not for 2 weeks):

  • Another for loop for several sets of 50.
  • Search for the color pink on the screen and click it. Ask [Y/n] on the command prompt, then mark it.
  • Custom input that asks for pauses.
位置: Saint Cloud, Stearns County, Minnesota, United States
电子邮件图标 Bluesky图标 Facebook图标 LinkedIn图标 Mastodon图标 Telegram图标 X图标

讨论

登录以留下评论