4

I am working with a program that collects a lot of data then shows it to you in the program. Unfortunately, the program is poorly designed and requires you to "approve" each bit of data collected manually by clicking a checkbox to approve it. In order to automate this process, I wrote a small script that scans for a checkbox, clicks it, then clicks "next item".

Unfortunately, this requires moving the actual mouse, meaning I can't use my computer until the program has finished. There are other questions that reference automating this with the winapi, however none of these work on Linux. What is a way to automate this on Linux?

asked Jul 4, 2017 at 0:42

1 Answer 1

3

You can simply start the program in a separate X server, for example using xvfb with

xvfb-run YOUR_PROGRAM

If you want to wrap just the instrumented program, that's possible too:

export DISPLAY=:42
Xvfb :42
THE_INSTRUMENTED_PROGRAMM
xdotool mousemove 1 1 click 1 # your instrumentation goes here
answered Jul 4, 2017 at 0:50
Sign up to request clarification or add additional context in comments.

1 Comment

Yes, both programs need to run in the same X server. With option 1 (xvfb-run, you start a wrapper program that kicks off both the data collection program and your bot). With option 2, replace THE_INSTRUMENTED_PROGRAM with the program you're instrumenting (you call it data collection program) and xdotool ... with your bot.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.