Re: How to tell the end of a shell




"inquirer" <noreply@xxxxxxxxxxx> wrote in message
news:482523c4$0$17507$afc38c87@xxxxxxxxxxxxxxxxxxxxxxx
I have a VB6 program which runs shell which runs another program which
in turn creates a file. As soon as I call the shell, I run a subroutine
which essentially pauses the main program for a few seconds whilst the
new file is created. I then use VB to open Word and read the newly
created file.

This works fine when running from my hard disk but when I try to run it
from a USB memory stick, the shell program takes several minutes to
create the file.

I need to be able to pause the main program until the shell program has
finished so I can then open the new file in Word.

Is there any way I can find out when the shell program has finished
creating the new file?

Thanks
Chris

Google for "Shell and Wait"
"Shell an application and wait asynchronously for completion"
http://www.vbaccelerator.com/home/vb/code/libraries/Shell_Projects/Shell_And_Wait_For_Completion/article.asp

With variation on a theme.
http://forums.devx.com/showthread.php?t=38098

http://www.vbaccelerator.com/home/vb/code/Techniques/Link_Spoof/LinkSpoof_zip_FileTool_bas.asp

Or you might chose to wait on the file to be saved:
FindNextChangeNotification
http://www.codenewsgroups.net/group/microsoft.public.vb.general.discussion/topic4647.aspx

http://www.mvps.org/vbvision/Sample_Projects.htm

Should keep you busy for a while. <g>

-ralph


.



Relevant Pages

  • SIGKILL to pty master
    ... child forks and pauses, the grandchild pauses. ... shell on a pty. ...
    (comp.os.linux.development.apps)
  • Re: How to tell the end of a shell
    ... As soon as I call the shell, I run a subroutine ... which essentially pauses the main program for a few seconds whilst the ... I then use VB to open Word and read the newly ...
    (microsoft.public.vb.general.discussion)
  • How to tell the end of a shell
    ... I have a VB6 program which runs shell which runs another program which in turn creates a file. ... As soon as I call the shell, I run a subroutine which essentially pauses the main program for a few seconds whilst the new file is created. ... I then use VB to open Word and read the newly created file. ...
    (microsoft.public.vb.general.discussion)
  • Re: bash subroutine syntax question
    ... My Subroutine { ... but that's incorrect as written. ... I just go to perl when shell isn't up to it (and I'd like to learn ... I would love to learn Perl, but have never had the time. ...
    (comp.os.linux.misc)
  • Re: Open File
    ... 'To open Word with file - Shell("MyWord.doc") ... I thought I'd seen threads that say Shellneeded an ... by launching cmd, ie, my example should have been ...
    (microsoft.public.vb.general.discussion)