Hi,
Relativly new to kix and I desperately need this script to work.
I have a pcchange.log file like this:
pc-0001
pc-0002
pc-0003

The kix script needs to read this input file, perform an action (net use, set some xcals rights) and after that delete this value from the pcchange.log, then continue with pc-0002 etc. etc.
I found some scripts here on the forum and tried to put them together but of course this doesn't work.
This is what I had in mind:
Open (1, "pcchange.log")

$PCNAME = ReadLine(1)

While @ERROR = 0

? "$PCNAME is the machine which requires action, this should be performed about here?"

$PCNAME = ReadLine(1)

Copy "pcchange.log" "pcchange.bak"
Del "pcchange.new"
$rc = Open(2,"pcchange.log",2)
$rc = Open(3,"pcchange.new",5)
$LineIn=ReadLine(2)
$LineOut=$LineIn+Chr(13)+Chr(10)
While @ERROR = 0
If InStr($LineOut,"$PCNAAM")>0
$LineOut=""
EndIf

$rc = WriteLine(2,$LineOut)
$LineIn=ReadLine(2)
$LineOut=$LineIn+Chr(13)+Chr(10)
Loop
$rc = Close(2)
$rc = Close(3)
Del "pcchange.log"
Copy "pcchange.new" "pcchange.log"
Del "pcchange.new"

Loop

$ = Close (1)

:End
? End of inputscript

------------------
I get confused on where to loop the script and IF this is even possible.
If you have any tips to get this to work, please let me know...
Many thanks in advance...

[ 06. October 2003, 14:58: Message edited by: nostradamus99 ]