| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| From: | Georg <dosusb AT googlemail DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: System() |
| Date: | Mon, 28 May 2012 13:39:19 -0700 (PDT) |
| Organization: | http://groups.google.com |
| Lines: | 35 |
| Message-ID: | <b519c87e-4fa7-4b29-a76c-d3b52c5e0afd@ec4g2000vbb.googlegroups.com> |
| References: | <92c86f75-e970-4998-94c6-56d6fbf885fe AT e15g2000vba DOT googlegroups DOT com> |
| <1c38ca22-52f5-470e-813f-1af6ed5f21d4 AT m16g2000yqc DOT googlegroups DOT com> | |
| <fea067ab-ee56-4b9e-bb73-ed3365fb9d59 AT ee2g2000vbb DOT googlegroups DOT com> | |
| <9e4eebca-6004-4c60-990a-a02d0c251ec7 AT h19g2000yqj DOT googlegroups DOT com> | |
| <b16ff03e-0f4a-4c05-93f8-e8ce37b34ef8 AT n4g2000vbz DOT googlegroups DOT com> | |
| <4facb41e AT news DOT x-privat DOT org> <e1b4c24c-5e9a-4825-a30b-c353b8db2dae AT p1g2000vbv DOT googlegroups DOT com> | |
| <4fb5d194 AT news DOT x-privat DOT org> | |
| NNTP-Posting-Host: | 46.78.35.225 |
| Mime-Version: | 1.0 |
| X-Trace: | posting.google.com 1338237559 30628 127.0.0.1 (28 May 2012 20:39:19 GMT) |
| X-Complaints-To: | groups-abuse AT google DOT com |
| NNTP-Posting-Date: | Mon, 28 May 2012 20:39:19 +0000 (UTC) |
| Complaints-To: | groups-abuse AT google DOT com |
| Injection-Info: | ec4g2000vbb.googlegroups.com; posting-host=46.78.35.225; posting-account=v5xbdQoAAAAOGc9Ccc-kLZyobvPlN3Qr |
| User-Agent: | G2/1.0 |
| X-HTTP-UserAgent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.4) |
| Gecko/20091016 Firefox/3.5.4,gzip(gfe) | |
| Bytes: | 2645 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id q4SKj3tZ012024 |
| Reply-To: | djgpp AT delorie DOT com |
On May 18, 6:35 am, Jason Hood <jad DOT DOT DOT AT yahoo DOT com DOT au> wrote:
> On 11/05/2012 22:07, Georg wrote:
>
> > Thank you Jason! I assume I could also write the line to execute into
> > an environment variable [setenv("doit", "notepad", 1);] and call that
>
> No, that won't work, as the environment is local to the process - once
> your manager exits, the variable is lost. Your manager has to write
> the actual batch file. Let's say your manager is called "manager.exe",
> you start it with "go.bat" and the program to run is "run.bat".
>
> go.bat:
> @echo off
> ::start the file manager
> manager
> :loop
> ::if the manager didn't create a file, it exited
> if not exist run.bat goto eof
> call run.bat
> del run.bat
> ::run the manager again, but let it know it's returning from a program
> manager -restart
> goto loop
> :eof
>
> run.bat:
> ::whatever program was selected by the manager
> @notepad
> ::one problem with this technique is having to take care of arguments
> ::in particular, you have to double up percent signs
>
> --
> Jason.
Thank you, Georg
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |