Open command prompt from final builder - build

Is it possible to open a command prompt from inside final builder 6.. with the env created from inside final builder?

Yes, just use the Execute Program Action, set the Program File to %DOSCMD% and turn off Wait for Completion and Hide Window. Any environment variables you set in FinalBuilder will be available in the command prompt window.

Related

How can I enter input in the output of vs code?

How would I enter user text (entered via cin) if I build the file using the top right button in the image below?
Is there a plugin that I have to use to disable the readonly console?
I believe that this is code runner extension, which by default disables (REPL) interactive terminal. To enable it, add this to your vscode json settings:
"code-runner.runInTerminal": true
Or open ui settings: type "code runner terminal" and check the
code-runner: Run In Terminal option
Next time you will run this code, it will run in the terminal.
Take a look at the configuration section config

View C++ output in terminal when executing Qt application (macOS)

How can I view what the output of commands such as cout is in the terminal when executing an application?
For example, if I have an application named application.app, in order to run it from the terminal what I do is type open application.app
This launches the app correctly but I am unable to see the output of the print statements that are in the code.
To see the program's stdout output in Terminal, you can run it instead like this:
./application.app/Contents/MacOS/application

How to enable System Error message when running executable from command line

According to Microsoft, "If [the system] cannot locate the DLL, the system terminates the process and displays a dialog box that reports the error. " This is the result I get when I run my application outside of the command line, but I do not get the same system error when I run the application from a shell environment such as command prompt or powershell.
Is there a way to show the same error message when the application is run from a command line interface?
https://msdn.microsoft.com/en-us/library/aa271571(v=vs.60).aspx
SetErrorMode(GetErrorMode() & ~SEM_FAILCRITICALERRORS);
but I don't think you want to do this, as you do not know in which environment the user will run your application.
It is usually now a good idea to popup a dialogbox in e.g. a service environment.
What is the problem with examining the error code of whatever is failing e.g. LoadLibrary() and reacting to this error?

Console prompt window appear on system("start dir") but not on system("start ipconfig")

I try to create a simple UI which runs a command prompt in the background (but the windows console must not disappear) while clicking on each button, resp.
But before, I try something like system("start dir"); to see if the button works.
Here is the problem: when I click on the left button the windows console appear and don't exit unit I close it. But this only work with system("start dir");. If I change dir to ipconfig (or another call-function) the windows console will appear for a second and the exit. I tried something like system("PAUSE"); or getch(); etc, but it doesn't work.
Why does this command work with dir but not with another command?
There is a fundamental difference between DIR and IPCONFIG, the DIR command is built into the command processor (aka shell), IPCONFIG is a separate program stored in c:\windows\system32.
When you type START /? at the command line then you can see why it treats them differently:
If it is an internal cmd command or a batch file then
the command processor is run with the /K switch to cmd.exe.
This means that the window will remain after the command
has been run.
If it is not an internal cmd command or batch file then
it is a program and will run as either a windowed application
or a console application.
The alternative is to ask the command processor to execute the command and exit afterwards. You do with the /c option:
system("cmd.exe /c dir");
Or simpler yet, since system() automatically passes off the job to the command processor:
system("dir");
Just stop using start :)

How to open text file in notepad with cmd window in background?

I want to open a text file without opening cmd window in the background. I have tried:
webbrowser.open('file.txt')
but it crashes ArcGIS so I tried following:
os.system('file.txt')
it opens text file without crashing ArcGIS but cmd window remains in the background and goes away when I close text file.
It is more of a display choice question and just checking if there is any suggestion to avoid cmd window in the background.
I don't know if this is what you want, but maybe you should create .bat file (something like here) and run this with Python subprocess.
Save your script with a .pyw extension and the console window won't appear.
From the Python documentation :
On Windows systems, there is no notion of an “executable mode”. The Python installer automatically associates .py files with python.exe so that a double-click on a Python file will run it as a script. The extension can also be .pyw, in that case, the console window that normally appears is suppressed.
You need to modify the program that calls the "add-in script" to run it with pythonw.exe (and not python.exe which is the default).