View Full Version : Run a batch from within a plugin
Let's say I have a C array of strings with TCC commands which I've
constructed dynamically within a plugin. I now want to run that code.
I could repeatedly call Command() but some TCC commands are only valid
in batch files (do ... enddo etc). So, is there a way to run a "batch
file" from a plugin if the batch is already in memory?
(I can easily save the stuff into a temp batch file, then call Command()
with that and delete the temp file afterwards. However, that seems not
very efficient; more importantly, it's not foolproof.)
--
cheers thomasl
web: http://thomaslauer.com/start ('http://thomaslauer.com/start')
thomasl wrote:
>
> Let's say I have a C array of strings with TCC commands which I've
> constructed dynamically within a plugin. I now want to run that code.
>
> I could repeatedly call Command() but some TCC commands are only valid
> in batch files (do ... enddo etc). So, is there a way to run a "batch
> file" from a plugin if the batch is already in memory?
Not at this time (though it's on the suggestion list).
Rex Conn
JP Software
vefatica
2008-07-05, 17:48
On Sat, 05 Jul 2008 15:37:55 -0500, you wrote:
>> I could repeatedly call Command() but some TCC commands are only valid
>> in batch files (do ... enddo etc). So, is there a way to run a "batch
>> file" from a plugin if the batch is already in memory?
>---End Quote---
>Not at this time (though it's on the suggestion list).
As you may be well aware, this seems closely related my request to be able to
"LOADBTM" (into memory) at the command line and later, perhaps repeatedly, run
the memory-resident copy.
rconn <> wrote:
>
> thomasl wrote:
> > Let's say I have a C array of strings with TCC commands which I've
> > constructed dynamically within a plugin. I now want to run that code.
> >
> > I could repeatedly call Command() but some TCC commands are only valid
> > in batch files (do ... enddo etc). So, is there a way to run a "batch
> > file" from a plugin if the batch is already in memory?
> ---End Quote---
> Not at this time (though it's on the suggestion list).
So, for the time being, the only feasible route is indeed writing the
stuff to a temp file and executing that?
If so, I add my vote for a function to execute in-memory batch files.
--
cheers thomasl
web: http://thomaslauer.com/start ('http://thomaslauer.com/start')
vBulletin® v3.8.1, Copyright ©2000-2010, Jelsoft Enterprises Ltd.