[AutoIt] Sorting array in list

01/31/2016 22:36 LiveLong23#1
Hi

Before i ask help i tell u want i want to make.
I want to make a tool that will list me all servers with server status ( main server name -> server name -> online or offline -> ping ).

Now i can have file that can be opened but i dont know how do i take items i need. When i open file it show me as an array but i cant take items how i want.

Try open file with notepad i was using sublime text 3 to see file structure.

Something like this

[Only registered and activated users can see links. Click Here To Register...]

[code]
#include <Array.au3>
#include <File.au3>

global $file = "D:\Igre\Forsaken World_en\update\server.lua"
global $oFile = FileOpen($file)
global $data = FileReadToArray($oFile)

;~ _ArrayDisplay($data)

For $i = 0 To UBound($data)-1
ConsoleWrite($data[$i] & @CRLF)
Next
[code]
01/31/2016 23:35 warfley#2
You need to write a text parser for this file iterating through the lines and reading the data.

It's not really difficult but if you are a beginner i would rewrite the file for a easier structure to parse
02/01/2016 00:27 LiveLong23#3
Problem is that this file is in game folder and if i modify it he crashing game all time, so i just need data from it.
02/01/2016 01:41 warfley#4
You could just create a copy of the file, or does the file change regulary?
02/01/2016 12:46 LiveLong23#5
I dont know if they change it but i think not.

Then i can only take ip port and names and put in GUI then check from time to time if servers are changed, but i think they dont change ip addresses often.