Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Hiding or minimizing a dos window
Replies: 1   Last Post: Feb 7, 2013 3:54 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Paul Mennen

Posts: 281
Registered: 12/7/04
Re: Hiding or minimizing a dos window
Posted: Feb 7, 2013 3:54 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Ok, with much struggle I've finally answered my own question about how to run a background dos program in a minimized window. So I thought I should share it. My solution is to follow the background dos program call with another dos program that minimizes the first window as follows:

> dos('DosProgram parameters > output.txt &'); % start background task
> dos('WinMin'); % minimize the background task window


WinMin.exe is a program I created myself. If you would like this exe, you can make it by creating a text file with the name WinMin.ahk that contains the following single line:

WinMinimize, C:\Windows\system32\cmd.exe

Then install "autohotkey". Then right click on the ahk file and select "compile".
That's it ... you'll have your very own dos window minimizer. And by the way, the call to WinMin.exe does not create its own dos window because it does not need to run in the background and thus does not include the trailing ampersand character.

I was thinking of putting WinMin.exe on the file exchange, but I would feel a bit silly doing so since I suspect there is a simpler more elegant method routinely used to do this that I just don't know about.

~Paul



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.