News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

qikpad Plus - a simple GUI for the DOS prompt

Started by jj2007, December 26, 2012, 10:09:27 AM

Previous topic - Next topic

dedndave

another possibility is the CMD.EXE window, as well
you may be using AllocConsole to create the console
it can also be created with CMD.EXE and a number of switches - some are pipe-related

C:\>cmd /?>cmd.txt

will get you a lot of text to read   :P

jj2007

Dave,
Programs Run Through Xp_cmdshell Have No User Interface tells a similar story:
QuoteIf you run a program through the xp_cmdshell extended stored procedure, the program only runs in the background. The xp_cmdshell extended stored procedure does not display the user interface of the programs that run in its context. If an application that is run through xp_cmdshell does needs user interaction from a user interface (for example, the application tries to create a dialog box or a message box that needs user input) it will stop responding because it is waiting for input. However, xp_cmdshell will never display the user interface; therefore, the user cannot provide any input.

That is confirmed by my tests: As soon as the GUI app has also a console (/Subsystem:Console), it pops up immediately. That does not explain, though, why
- launching notepad from the DOS prompt works fine
- an additional echo <Enter> in CmdGUI works, too
- start notepad.exe works.

@Erol: font colours will be added soon.

dedndave

seems like one of the CreateNamedPipe flags addresses that

QuotePIPE_WAIT 0x00000000
Blocking mode is enabled. When the pipe handle is specified in the ReadFile, WriteFile, or ConnectNamedPipe function, the operations are not completed until there is data to read, all data is written, or a client is connected. Use of this mode can mean waiting indefinitely in some situations for a client process to perform an action.

PIPE_NOWAIT 0x00000001
Nonblocking mode is enabled. In this mode, ReadFile, WriteFile, and ConnectNamedPipe always return immediately. Note that nonblocking mode is supported for compatibility with Microsoft LAN Manager version 2.0 and should not be used to achieve asynchronous I/O with named pipes. For more information on asynchronous pipe I/O, see Synchronous and Overlapped Input and Output.

jj2007

Dave,

Thanks, this looks interesting although some tests showed no change. Use start notepad for GUI apps...

In the meantime, I have polished the app and added the font & colour features. Hope it is useful for somebody.

Note that if some text is selected, only the selection will be saved with the Ctrl S feature. This is by design :biggrin:

Vortex

Hi Jochen,

Once again, very nice work :t Many thanks.

Gunther

You have to know the facts before you can distort them.

jj2007

Thanks, Erol and Gunther.

Attached version 3 offers a context menu (i.e. right-click popup) with the current history.

The format of the two dat files has not changed, so: if you saved your history or changed colours with the previous version, do NOT extract the dat files.

\Masm32\CmdGUI\CmdGUI.asc is the source in RichMasm (\Masm32\RichMasm\RichMasm.exe) format - work in progress, the usual disclaimers apply.

jj2007

Version 4 of CmdGUI attached.

You may like autocompletion with TAB, e.g.
>t<TAB> displays all documents that start with t
>*.exe<TAB> displays all executables

etc

Again, if you saved your history or changed colours with the previous version, do NOT extract the dat files. Feedback on handling and design is highly welcome, of course.

Press F1 once CmdGUI is running to see a warning regarding executables that use inkey - they must be launched as start MyApp.exe

The usual disclaimers apply - use at your own risk bla bla.