#142732 - 2005-06-30 09:11 PM
Re: Calling a variable in a Kix script passed from a batch file
|
UJS
Fresh Scripter
Registered: 2005-06-30
Posts: 6
|
Quote:
k, this is also said in manual but you just want to pass values to kix, right?
so, just call it like: (w)kix32.exe myscript.kix $variable="myvalue"
and that's it.
Good afternoon all,
Thanks again for the replies, I'm headed in the right direction.
Using the syntax posted above, I'm able to set the variable that I need with a variable that I provide. The script runs and HOMEDRV gets set. However, when that script exits and returns to my batch file or even a cmd prompt, the %homedrv% variable is set to whatever it was before the script runs. To get the proper %homedrv%, I must exit and open a new cmd window.
The two workarounds that I can think of would be,
1. write %homedrive% to a text file and grab my variable from there to continue with my batch file execution
or
2. Find a way to return $HOMEDRV as a return code which I can use to continue executing the script.
I have tried 1. but I'm afraid my understanding of Kix logic is in it's infant stages and I'm unable to get it to work.
Basically my attempt has been REDIRECTOUTPUT("c:\temp\HOMEDRV.txt",overwrite) ? $HOMEDRV
But the contents of HOMEDRV.txt are
0 PR10398
Can anyone explain why I'm getting the '0' on the first line or how I can get rid of this? The second line is the information that I need.
Best Regards,
UJS
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 1014 anonymous users online.
|
|
|