how do I close a cmd.exe window automatically?
Rich Mooney
tech at paynesparkman.com
Mon Aug 26 10:09:01 EDT 2002
Thanks Ken and Dar. The following command does exactly what I want:
launch "displayalarm.txt" with "notepad"
Rich Mooney
Payne Sparkman Mfg.
shop at paynesparkman.com
Ken:
> The problem is the 'shell' command: it is a "blocking" command - i.e. it
> will launch a process and then will wait until that process is closed
before
> continuing. You might want to look into "open process" instead.
Dar:
>Read about "start" in your W2K help. I have primarily used this
>with console apps, but it will work with Notepad and it might do
>what you want.
>There may be other approaches with launch or open process.
Rich:
> > I have a button which uses the following command:
> > get shell("notepad displayalarm.txt")
> >
> > I'm using it to open a file generated with my software in Notepad on
Win2k
> > Pro.
> > This works fine but my stack is frozen until I close the cmd.exe window.
> > Closing Notepad also unfreezes the stack but, I want the user to be able
> to
> > view this file while the application continues to run automatically and
I
> > don't want them to have to remember to close the command window.
> Otherwise,
> > they will eventually forget and walk away from the computer leaving all
> > automated functions suspended. I tried adding the line get
shell("exit")
> > but, the stack freezes on the previous line and never sees that exit
> command
> > until after I close the window manually. Any ideas?
More information about the metacard
mailing list