Compiled wbt on console?

Started by hubbel, January 03, 2018, 05:31:45 AM

Previous topic - Next topic

hubbel

Hi there,

i want to create command line applications using winbatch + compiler as it was in the good old MS-DOS times - calling an exe with parameters and get a return on the prompt. I found out how to pass command line parameter into a winbatch.

I took a look into the Console Wrapper extension, but this makes things more complex instead of easier for me. Also i have concerns to use this for automated tasks in a productive business environment.

The method of Write Data to An Existing Console Window STDOUT seems to fit better to my needs as it doesn't need an additional .exe/extender, but it won't return to the command prompt, you'll always need to press the return-key afterwards to return to the real shell and i am not sure how the console-id is determined if there're several opened the same time.

I also read the article about Console Applications with Winbatch and i generally understand and agree - but is there really no simple way - at least for the basic operations like a response to e.g. myapp.exe -help?

td

You deserve big thanks for taking the time to search and research your issue before posting to the Forum.  It stands as a great example for others.

Unfortunately, the last Tech Database article you refer to does a good job of explaining why you can't create a console application with WinBatch.  WinBatch is a GUI application and all compiled WinBatch scripts are GUI applications.  GUI applications are fundamentally different than console applications in the Windows ecosystem. 

However, there are plans to create a console based version of WinBatch that will allow you to execute WinBatch and user-defined procedures from a special WinBatch console window.  This is similar to the console window approach used by Python, Powershell, and other scripting environments.  This is mentioned in our mission statement page:

http://www.winbatch.com/mission.html
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

kdmoyers

<< there are plans to create a console based version of WinBatch >>

Woo Hoo!!! I would find that very useful.
-K
The mind is everything; What you think, you become.

ChuckC

I've been doing a fair amount of work lately with developing commandlet modules for PowerShell as part of making some administrative functions available for a product that traditionally has only had a GUI admin client program.

While I've been working on that project, the thought occurred to me that it might be handy to have the WinBatch "WIL Interpreter" be "hosted" such that a PowerShell session to could create an instance of it and then feed commands to it to execute WBT files or possibly WBC files.  Is that in the realm of what's being considered for a WIL command line utility?  We can already use the .NET integration features within WIL to host a PowerShell session from within the WIL execution environment, and it seems like a complementary method for invoking WIL from within PowerShell would add the greatest amount of flexibility & integration when it comes to cross-scripting between the two environments.



stanl

and slightly off-topic.... I would like to see WB to be able to handle XAML files.