Python Forum
How to call a function from exe file via CMD
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to call a function from exe file via CMD
#1
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How do I call sys.argv list inside a function, from the CLI? billykid999 3 753 May-02-2023, 08:40 AM
Last Post: Gribouillis
  how to call an object in another function in Maya bstout 0 2,042 Apr-05-2021, 07:12 PM
Last Post: bstout
  In this function y initially has no value, but a call to foo() gives no error. Why? Pedroski55 8 3,418 Dec-19-2020, 07:30 AM
Last Post: ndc85430
  how do i store then call a mp3 from sqlite3 .db file gr3yali3n 3 5,635 Dec-11-2020, 10:28 AM
Last Post: snippsat
  Struggling for the past hour to define function and call it back godlyredwall 2 2,161 Oct-29-2020, 02:45 PM
Last Post: deanhystad
  list call problem in generator function using iteration and recursive calls postta 1 1,863 Oct-24-2020, 09:33 PM
Last Post: bowlofred
  subprocess call cannot find the file specified RRR 6 16,386 Oct-15-2020, 11:29 AM
Last Post: RRR
  function call at defined system time? Holon 5 3,158 Oct-06-2020, 03:58 PM
Last Post: snippsat
  How to call/read function for all elements in my list in python johnny_sav1992 1 2,041 Jul-27-2020, 04:19 PM
Last Post: buran
  Call a python file with anothr python file skaailet 3 2,265 Apr-30-2020, 03:41 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020