Page 1 of 1 1
Topic Options
#40115 - 2003-05-14 11:31 AM etc\Services
Mike Duhwald Offline
Fresh Scripter

Registered: 2003-01-13
Posts: 40
I would like to change the \..\etc\services File by script with parameters this means: script.kix /a should add entries - script.kix /r should remove them.

The additional/new entries should be 'parsed' out of a specific text file.

Can I realize this by Kix and if yes how?

Regards
Mike

Top
#40116 - 2003-05-14 11:35 AM Re: etc\Services
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, no.

if you read manual you see that parameters passed to script needs to be entered as:
wkix32.exe script.kix $param="value"

everything else is possible [Wink]

you might want to read about readline() and writeline() or even check our FAQ about using UDFs and...

how much do you know?
_________________________
!

download KiXnet

Top
#40117 - 2003-05-15 12:54 AM Re: etc\Services
Mike Duhwald Offline
Fresh Scripter

Registered: 2003-01-13
Posts: 40
Nothing at all-- Tried but failed

Regards
Mike

Top
#40118 - 2003-05-14 01:10 PM Re: etc\Services
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
what you have tried?
_________________________
!

download KiXnet

Top
#40119 - 2003-05-14 02:53 PM Re: etc\Services
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Mike,

What are you trying to do here? What is the end result you are looking for?

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#40120 - 2003-05-14 03:00 PM Re: etc\Services
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See KixStart v1.1 - Startup Script for KiXtart for a way to pass comand-line args into a KiXtart script.
_________________________
There are two types of vessels, submarines and targets.

Top
#40121 - 2003-05-14 04:06 PM Re: etc\Services
New Mexico Mark Offline
Hey THIS is FUN
****

Registered: 2002-01-03
Posts: 223
Loc: Columbia, SC
If you search this board, you will find some good discussions about passing parameters. IMO, parameter passing is the biggest drawback to KiXtart scripts as utilities, but there are several good work-arounds.

For simple sets of parameters in a script written for general usage, I generally just write a cmd front end. For example:

REM script.cmd
if /i "%1" EQU "/A" if "%2" NEQ "" goto ADD
if /i "%1" EQU "/R" if "%2" NEQ "" goto REMOVE
echo Syntax: script /A|/R "Text"
goto DONE
:ADD
kix32 script $Add=1 $Line=%2
goto DONE
:REMOVE
kix32 script $Add=0 $Line=%2
goto DONE
:DONE

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
0 registered and 1110 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.058 seconds in which 0.026 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