How to interact with another program gui from an R script?

154 views Asked by At

I am experienced in data analysis itself, but I am a beginner in terms coding or programming that is directed towards "software engineering".

For my work I often have to use a third-party software to get a specific excel file which contains data I have to analyse in R (on a Windows machine). This process always looks the same: start the program via the exe, click some buttons put in some text into some text-fields, click a button again and then "save as" the file.

I would like to do this automatically as part of an R script where the rest of the analysis happens, but I was unable to find meaningful resources, especially catering to my rather beginner level of programming or software engineering.

Is that even possible in R at all? I have found some promising resources regarding other languages, however I would very much prefer to do this in R if possible.

Can i emulate the input through the gui? Do I have to find out what is actually done "behind the scenes" when i click a button in this package? If yes, how does one do to find this information?

I know that it is relatively easy to start programs via .exe files with the system and system2 package, but I do not understand how i then further interact with these programs. I have also found references to the processx package, but I did not find much in regards to tutorials or such in how to use it (besides starting or ending a process).

Glad for any form of help!

Edit to make aim more clear: It is Not possible nor do i want to what the Program is doing itself done in R.

The program creates a dataset from external unobtainable sources. I want r to start the Program, Tell it what Dataset IT should create via Input and Thema Close IT again.

The Python Module win32com seems to be able to do that

0

There are 0 answers