0

I am attempting to create a batch script to deliver an instruction to an application to open a file instead of using my mouse to click Open File -> and then manually selecting it (app has a GUI and no native command line support I am aware of, although it is open source and I have the code available to me).

Basically, all this script needs to do is to fill out a field in the application which has a total of two fields. I am trying to figure out a way to do this with no input from the user apart from execution of the command.

If anyone could help with this, I would greatly appreciate it.

I have tried simply executing the file with the program, this does not work. I also determined through the source code that the program defines the path variable as "WDL_String variable", although I am not quite sure what to do with this information.

New contributor
StackQs is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
2
  • the program defines the path variable as "WDL_String variable" - Is the value of the variable the path to the file which is chosen after the clicking on the Open file? Also, if you have the source code for the application, is there anything in it that says the application can be run with command line arguments? For example, you can open a *.txt file from cmd with something like notepad C:\path\to\your\textfile.txt. Perhaps you can do the same with your *.exe. yesterday
  • @FiddlingAway have tried the method you described in the second part of your post, it doesn't work. The source code describes the path string as such. It first defines the path as myPath(). It then uses the following code. WDL_String initFileName; WDL_String initPath(this->myPath.remove_filepart()); pGraphics->PromptForFile( initFileName, initPath, EFileAction::Open, "zip", [&](const WDL_String &fileName, const WDL_String &path) { To open a dialog box and allow you to choose your file. I want to populate the path by command line instead.
    – StackQs
    yesterday

0

Your Answer

StackQs is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.