GRiP ~ Xspawn
GRiP ~ Xspawn
(OP)
I am creating a simple GRip Programme to generate a string.
I then need this string send to a batch file as an argument which the batch file can then use.
I can get the xpsawn command to execute the batch file, but cant get it to accept the argument.
I'm not sure if it’s the GRiP programme which is wrong, or my batch file.
Does any one have an example?
Cheers,
Befuddled
I then need this string send to a batch file as an argument which the batch file can then use.
I can get the xpsawn command to execute the batch file, but cant get it to accept the argument.
I'm not sure if it’s the GRiP programme which is wrong, or my batch file.
Does any one have an example?
Cheers,
Befuddled





RE: GRiP ~ Xspawn
Best of Luck
Hudson
RE: GRiP ~ Xspawn
PS. I have manually checked the batch file and it works ok. So its something i am doing with the xspawn command.
RE: GRiP ~ Xspawn
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: GRiP ~ Xspawn
I wouldn't think XSPAWN is going to pass the arguments to you 3rd party application correctly. If you're trying to write a command line argument with a series of switches you couldn't be sure that Grip will output the XSPAWN without interpreting those switches for itself. This may be unfortunate, but as always try a simple example first to prove the case and take it from there.
What we are suggesting seems the easier work around having limited expectations of GRIP. You're almost certain to be able to get something to work. You can even get one batch file to run another if you need to rename the grip output file from .txt to .bat
I'd start by creating a grip program that uses XSPAWN to run a simple batch job that just says "hello" or something, then once you know that you can get XSPAWN to work at all then you have something useful to build on.
Best Regards
Hudson
RE: GRiP ~ Xspawn
In this example the two arguments have been hardcoded as arg1 and arg2 but I believe that deriving the string(s) for the argument(s) is not the issue in the original question.
Grip source code:
xspawn/'cmd.exe','/c','start','"title"','z:\batch_test.bat','arg1','arg2'
halt
Batch file source code:
@echo off
echo %0
echo %*
The output is displayed in a dos shell:
z:\batch_test.bat
arg1 arg2
This xspawn example is overly complex in order to force the display to output in a visible dos shell window. The command could be shortened to just
xspawn/'cmd.exe','/c','z:\batch_test.bat','arg1','arg2'
In the example batch file the %* means "all arguments" as opposed to the specific arguments %1 and %2.
Regards, Joe