#194024 - 2009-05-27 06:51 PM
Re: does kix have input prompts?
[Re: itdaddy]
|
eriqjaffe
Hey THIS is FUN
Registered: 2004-06-24
Posts: 214
Loc: Arlington Heights, IL USA
|
There's the GETS command, which you can turn into an array:
? "Enter in server names, separated by commas: " gets $foo
$severs = split($foo,",")
Edited by eriqjaffe (2009-05-27 06:52 PM)
|
|
Top
|
|
|
|
#194025 - 2009-05-27 06:51 PM
Re: does kix have input prompts?
[Re: itdaddy]
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4562
Loc: USA
|
You can use Gets, but the input will be a string. In order for it to be an array you will have to split() the input. Something like:
? "Type Input, seperated by commas"
gets $input
$input=split($input,",")
for each $item in $input
? $item
next
|
|
Top
|
|
|
|
#194035 - 2009-05-28 10:36 AM
Re: does kix have input prompts?
[Re: itdaddy]
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
A couple of suggestions:
- Don't enter the server list every time, life is too short. Store the list in an INI file or registry key and update it when you add or remove a server.
- KiXtart has it's own Shutdown() function that you can use to restart servers rather than using an external utility.
- Don't forget to check that the servers go down as well as come up. One of my biggest problems is servers that should restart after patching - they start to go down but never quite get there, so they continue to respond to PING ok but the server is left in an unusable state.
I've got some code knocking around somewhere that does pretty much what you are looking for. Try to get it working yourself (it's much more fun that way) and if you get stuck post again.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 874 anonymous users online.
|
|
|