#46327 - 2003-10-06 02:54 PM
read value, perfom action, del value
|
nostradamus99
Fresh Scripter
Registered: 2003-10-06
Posts: 10
|
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 ]
|
Top
|
|
|
|
read value, perfom action, del value
|
nostradamus99
|
2003-10-06 02:54 PM
|
Re: read value, perfom action, del value
|
Lonkero
|
2003-10-06 03:01 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-06 03:12 PM
|
Re: read value, perfom action, del value
|
Lonkero
|
2003-10-06 03:20 PM
|
Re: read value, perfom action, del value
|
Radimus
|
2003-10-06 04:02 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-06 04:18 PM
|
Re: read value, perfom action, del value
|
Radimus
|
2003-10-06 04:19 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-06 04:30 PM
|
Re: read value, perfom action, del value
|
Howard Bullock
|
2003-10-06 04:35 PM
|
Re: read value, perfom action, del value
|
Radimus
|
2003-10-06 06:18 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-06 06:48 PM
|
Re: read value, perfom action, del value
|
Radimus
|
2003-10-06 06:55 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-06 07:08 PM
|
Re: read value, perfom action, del value
|
Sealeopard
|
2003-10-06 07:12 PM
|
Re: read value, perfom action, del value
|
Lonkero
|
2003-10-06 07:14 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-06 07:25 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-11 12:48 AM
|
Re: read value, perfom action, del value
|
Lonkero
|
2003-10-11 12:57 AM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-10 01:32 PM
|
Re: read value, perfom action, del value
|
Sealeopard
|
2003-10-10 03:14 PM
|
Re: read value, perfom action, del value
|
nostradamus99
|
2003-10-10 03:41 PM
|
Re: read value, perfom action, del value
|
Lonkero
|
2003-10-10 05:52 PM
|
Re: read value, perfom action, del value
|
Radimus
|
2003-10-10 05:55 PM
|
Re: read value, perfom action, del value
|
Lonkero
|
2003-10-10 07:05 PM
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 388 anonymous users online.
|
|
|