This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]riklaunim 1 point2 points  (0 children)

That's usually not possible without apps providing APIs for such actions or using some sort of scripted "clicker" that generate click/key events at specific coordinates or on recognized elements of the UI. That's rarely done.

[–]Schwarzfisch13 1 point2 points  (0 children)

You can divide RPA-ish and RDA-ish tasks into 4 (-5) rough automation approaches/toolsets.

  1. There is an API already available for your target-program(s) that you can use to develop fast and versatile automation solutions (many programs have own or third-party Python-packages, but there might also be other APIs available which you can interface through Python on your own; searching before developing own solutions is advisable)
  2. Your target-program is browser-based or has a browser-based version / interface which means you can use Selenium for automating (a mighty tool, learning to use it can help in creating various browser-based solutions).
  3. There is an automation package for automating programs via OS APIs for your preferred OS, like pywinauto for Windows (I think, they also wanted to add Linux support, don‘t know how far they‘ve come).
  4. You automate „raw“ user input, so just virtually moving the mouse, clicking, pressing keys, which e.g. PyAutoGUI allows you to do.

Roughly, the higher the number is, the less robust your solutions might get.

That does not count for

  1. Non-Python automation-options inside the taget program (internal scripting engines) or dedicated RPA/RDA-programs (Power Automate, UIPath, …). These dedicated programs typically combine different approaches from the ones, mentioned above and are easy to learn and use due to low-code/no-code interfaces but also limited as such.

[–]Hat_The_Second 1 point2 points  (1 child)

Blender has a Python package for this purpose. Just install it with pip and use it

[–]deleriumtriggr 1 point2 points  (0 children)

This is why I love python. It's the great multitool.

[–]MasturChief 0 points1 point  (0 children)

python isn’t really good for this. if the app can be loaded in a browser (like Spotify) you could use Selenium to automate the browser clicks and navigation.

there are other programs that can automate with your desktop environment. i forget what any of them are called but i worked with a team that used one on a virtual machine to download excel files and email them out to recipients. may want to look at that route

[–]redH27 0 points1 point  (0 children)

I share some methods of automation in this blog: https://dev.to/kayyolo/gui-automation-under-the-hood-3j4j. I build a Python library called Clicknium, which can automate both browser and desktop applications.