How to fill text fields in gui application via command line?

I am developing a NLP (Natural Language Processing) application in python, and I want to use the following UNL (Universal Networking Language) EnConverter, which is an executable gui - third party - application and works only with windows (I do not have source code):


So, I want to know how I can program the console application that calls this EnConverter, and click the "Settings" button, and then fill in the text fields in the following image:

When I click the " Settings " button, the previous window appears ... I want my application to fill out these text fields, then click " OK " .... When you click OK, the application returns to the first window ... Last thing for the application (my application) - click the " EnConvert " button in the first window ... Look at the first image, please.

I know that this is possible because my professor did this job in Perl ... And he refused to tell me how !!! I explored the internet but got nothing!

+4
source share
3 answers

You can use Win32 :: GuiTest . It can detect widgets, click buttons, write text in a graphical interface, etc.

+4
source

You can use PyWinAuto . It can detect widgets, click buttons, write text in a graphical interface, etc.

+2
source

The Windows Sendkey package looks like it is perfect for this.

On the page:

In this example, SendKeys is used to enter "Hello World!". in a notebook.

import SendKeys SendKeys.SendKeys(""" {LWIN} {PAUSE .25} r Notepad.exe{ENTER} {PAUSE 1} Hello{SPACE}World! {PAUSE 1} %{F4} n """) 
+1
source

Source: https://habr.com/ru/post/1345067/


All Articles