Page 1 of 1 1
Topic Options
#120623 - 2004-06-03 11:43 PM Strings on the command line
xpanmanx Offline
Starting to like KiXtart

Registered: 2002-07-08
Posts: 108
Loc: St. Louis MO USA
Greetings,

I'm trying to pass a string to a packaged (executeable) script via the command line...
Code:
mykixscript.exe $var=boogers

...but the string of boogers is not retrieved.


However, it works famously if I call the unpackaged script...
Code:
kix32.exe mykixscript.kix $var=boogers



Seriously, what gives?

Top
#120624 - 2004-06-03 11:47 PM Re: Strings on the command line
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Well I think we would need to see what the code is inside your script and how you also call the installer.

I assume you're using SHELL within the script, but please post your full code or the full portion that makes up this launcher. Please use the UBB CODE TAGS to retain the code formatting in the post.

Top
#120625 - 2004-06-03 11:47 PM Re: Strings on the command line
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you should read the packager documentation how to pass vars on commandline.
anyway, it may never work with the packager, but that is something you need to find out yourself, specially you don't specify what soft you are using.
_________________________
!

download KiXnet

Top
#120626 - 2004-06-04 05:27 AM Re: Strings on the command line
xpanmanx Offline
Starting to like KiXtart

Registered: 2002-07-08
Posts: 108
Loc: St. Louis MO USA
Well, lookie here

This works WONDERFULLY.

My package command line looks like this:
Code:
package.exe [$target=www] [$site=xxx] [$files=yyy] [$pstools=zzz]

------
Where [###] defines optional parameters.
Not all of the parameters are used all of the time.



And the processing goes thusly...

Code:
;Load variables from command line, if they are present

$options_array = Split($exeparams,' $')
For Each $element In $options_array
$x = SubStr($element,InStr($element,'=')+1)
Select
Case InStr($element,'target=') $target = Lcase($x)
Case InStr($element,'site=') $site = Lcase($x)
Case InStr($element,'files=') $files = Lcase($x)
Case InStr($element,'pstools=') $pstools = Lcase($x)
EndSelect
Next

Thanks for pointing me in the right direction!

Best regards,

Tim ==

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.048 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org