Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 01:47

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[AutoIt] Sorting array in list

Discussion on [AutoIt] Sorting array in list within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2014
Posts: 43
Received Thanks: 1
[AutoIt] Sorting array in list

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



[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]
Attached Files
File Type: zip server.zip (1.1 KB, 8 views)
LiveLong23 is offline  
Old 01/31/2016, 23:35   #2
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,137
Received Thanks: 573
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
warfley is offline  
Old 02/01/2016, 00:27   #3
 
elite*gold: 0
Join Date: Jan 2014
Posts: 43
Received Thanks: 1
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.
LiveLong23 is offline  
Old 02/01/2016, 01:41   #4
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,137
Received Thanks: 573
You could just create a copy of the file, or does the file change regulary?
warfley is offline  
Old 02/01/2016, 12:46   #5
 
elite*gold: 0
Join Date: Jan 2014
Posts: 43
Received Thanks: 1
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.
LiveLong23 is offline  
Reply


Similar Threads Similar Threads
Autoit XML to Array
11/19/2013 - AutoIt - 7 Replies
Hallo, ich möchte eine XML Datei auslesen und in ein Autoit Array verwandeln. Derzeit muss ich allerdings aus dem Datensatz mehrere Arrays bauen da ich nicht weiß wie ich mehrere Spalten füllen kann. Hier ein Beispieldatensatz aus der XML: Hier mein Ansatz für mehrere Array´s $sData1 = BinaryToString(InetRead("http://intern/bestan d.php", 19)) $sDataprodukt = StringRegExp($sData1, "\Q<produkt>\E(.+?)\Q</produkt>\E " , 3)
JAVA problem array sorting
09/28/2012 - General Coding - 1 Replies
i use three arrays where in System.out.println("Enter number of process: "); int process = in.nextInt(); String name = new String; int age = new int; double income = new double; bla bla bla so basically i used three arrays and a for loop and the outcome is this. (note: this is a user input)
Autoit Array Verändern :S
01/04/2012 - AutoIt - 11 Replies
Hi leute. Ich habe mir gerade die playerstructs von css besorgt, und wollte zum testen ein script machen, welches mir von allen möglichen 64 spielern im raum, alle werte liefert. Nun habe ich ein Paar arrays gesetzt. Global Const $NameOff = Global Const $HPOff = Global Const $TeamOff =
Autoit and array of bytes
12/22/2010 - AutoIt - 1 Replies
Does anyone here know if NomadMemory.au3 can search for array of bytes or write an array of bytes to memory? Just asking because it would be useful for some trainers im thinking of making in Autoit.



All times are GMT +1. The time now is 01:47.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.