walle Posted November 5, 2007 Share Posted November 5, 2007 I would like some help with seperating, or read the data between "|", so I easily could insert the data into labels using, GUICtrlCreateLabel. Here is an example of output "4.37 GB|100.0 %|Seeding|0 (282)|1 (22)|0.1 kB/s|47.3 kB/s|1d 16h|85.5 MB¶" #include <IE.au3> $rows = ControlListView("µTorrent 1.7.5", "", "SysListView321", "GetItemCount", "") $columns = ControlListView("µTorrent 1.7.5", "", "SysListView321", "GetSubItemCount", "") $file = FileOpen( @HomeDrive & "\Temp\IMG" & "\temptorrent.ini", 2 ) For $i = 0 To $rows -1 $data = "" For $r = 1 To 10 If $r <> 1 Then If $r = 10 Then $data = ControlListView("µTorrent 1.7.5", "", "SysListView321", "GetText", $i, $r) If $data = "" Then $data = "N/A" If $data = "8" Then $data = "Forever" Else $data = ControlListView("µTorrent 1.7.5", "", "SysListView321", "GetText", $i, $r) & "|" If $data = "|" Then $data = "N/A" If $data = "8|" Then $data = "Forever|" EndIf FileWrite( $file, $data ) EndIf Next FileWriteLine( $file, "¶" ) Next FileClose( $file ) ConsoleWrite(FileRead( @HomeDrive & "\Temp\IMG" & "\temptorrent.ini" ) ) ConsoleWrite( @CRLF & StringLen( FileRead( @HomeDrive & "\Temp\IMG" & "\temptorrent.ini" ) ) ) 4.37 GB|100.0 %|Seeding|0 (282)|1 (22)|0.1 kB/s|47.3 kB/s|1d 16h|85.5 MB¶ 62.2 MB|100.0 %|Seeding|0 (13)|0 (3)|N/AN/A8|0.0 kB¶ 40.1 MB|100.0 %|Seeding|0 (7)|0 (0)|N/AN/A8|0.0 kB¶ 88.2 MB|100.0 %|Seeding|0 (46)|0 (11)|N/AN/A8|10.1 MB¶ 97.9 MB|100.0 %|Seeding|0 (43)|0 (10)|N/AN/A8|9.71 MB¶ 4.40 GB|100.0 %|Seeding|0 (717)|0 (9)|N/AN/A8|378 MB¶ 774 MB|100.0 %|Seeding|0 (118)|3 (22)|0.1 kB/s|10.3 kB/s|1d 1h|240 MB¶ 4.40 GB|100.0 %|Seeding|0 (773)|2 (76)|0.3 kB/s|0.2 kB/s|8|152 MB¶ 3.71 GB|100.0 %|Finished|0 (0)|0 (0)|N/AN/A8|88.3 MB¶ 69.0 MB|100.0 %|Seeding|0 (9)|0 (1)|N/AN/A8|0.0 kB¶ 4.46 GB|0.1 %|Stopped|0 (0)|0 (0)|N/AN/A8|0.0 kB¶ 4.39 GB|33.9 %|Stopped|0 (0)|0 (0)|N/AN/A8|32.0 kB¶ Link to comment Share on other sites More sharing options...
McGod Posted November 5, 2007 Share Posted November 5, 2007 Use a StringSplit($Array, "|") [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
weaponx Posted November 5, 2007 Share Posted November 5, 2007 $myData = "4.37 GB|100.0 %|Seeding|0 (282)|1 (22)|0.1 kB/s|47.3 kB/s|1d 16h|85.5 MB¶" $myArray = StringSplit($myData, "|") Link to comment Share on other sites More sharing options...
walle Posted November 5, 2007 Author Share Posted November 5, 2007 (edited) $myData = "4.37 GB|100.0 %|Seeding|0 (282)|1 (22)|0.1 kB/s|47.3 kB/s|1d 16h|85.5 MB¶"$myArray = StringSplit($myData, "|")ofc, thank you! Edited November 5, 2007 by walle Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now