Python Forum

Full Version: How to call a function from exe file via CMD
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It is possible to do that so?
This is also due to the same reason as previous posts (if you got read them)

I am using AutoIT to design fancy GUI, which consists of several of buttons.
If different buttons will trigger different .exe file, this will gonna reset the webdriver variable and will gonna keep launch new Chrome browser window. In which, this is not my expected outcome.
As what metulburr advised, combined them into 1 file then trigger them function by function.
So I had follow his advised to combined them into 1 python file and convert into .exe file

So my list of Files:-
  • automate.exe
  • automate.xlsx
  • chromedriver.exe

Of course I can always revert back to several .exe files to handle different website automation process, like:-
  • websiteA.exe
  • websiteB.exe
  • websiteC.exe
  • automate.xlsx
  • chromedriver.exe
If I can have some advise of approach/method on how to not launch duplicate Chrome browser window when executed other .exe files

For example of Scenario with several .exe files:
  1. websiteA.exe is executed, new Chrome browser is open.
  2. websiteB.exe is executed, found existing browser, open as new tab in the existing browser
  3. websiteC.exe is executed, found existing browser, open as new tab in the existing browser

Thanks for the golden advanced information. Much appreciate