Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting Text......

Status
Not open for further replies.

napjunk

Technical User
Dec 20, 2001
11
US
Ok, I'm writing an application that downloads a server list from napigator.com/servers.php I've got the code to do that, but i need to be able to sort the text i get...cause as of right now it comes out like this:

ip port network_name user_count file_count data_amount dns

Example:
212.171.39.116 7777 SonikNap 20839 8025168 213009 resurrection.dns2go.com 62.211.171.110 7777 SonikNap 20772 7967449 211678 strawberry.dns2go.com

I'm thinking what it will be is an array,with all the data from the servers.php file where it sorts through and assigns like

aryDNS[1]
aryDNS[2]

and

aryPORT[1]
aryPORT[2]

and

aryNetWorkName[1]
aryNetWorkName[2]

then

just do this:
do while not EOF(1)
Print #1, "[HKEY_CURRENT_USER\Software\FileNavigator_26\NapsterServerList\" aryServerCount[0] "]"
Print #1, chr(34) "Description" chr(34) "=" chr(34)aryNetWorkName1 chr(34)
Print #1, "Host"= aryDNS[0]

ect...
i think....how would i go about doing that...
 
You could put it as an array and use a bubble sort to move the items around.

if listitem(x)>listitem(y) then...

I hope this helps. -God Bless
 
Put it in a sorted text box and then retrieve it sequentially. Peter Meachem
peter@accuflight.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top