Jump to content
Sign in to follow this  
Zibit

Need help with StringSplit

Recommended Posts

Zibit

ok i cant seem to notice anything and i hope you can help.

#include <File.au3>
$i = 0
$count = _FileCountLines("users.ini")
$splitter = string('"')
Do
    $i = $i + 1
    $read = FileReadLine("users.ini", $i)
    $string = StringRight($read, 1)
    if $string = $splitter then 
        $split = StringSplit($read, $splitter)
        ConsoleWrite($split[2] & @CRLF)
        endif
    Until $count = $i

File Being Searched:

"85.89.36.106" "" "abcdefghijklmnopqrstu" "de"
"85.89.36.54" "" "abcdefghijkmnopqrstu" "de"
"Ef | Skull CanDy" "" "abcdeghijkmnopqrstu" "e
"->ARU|| F1c0.mp5" "" "bcdeghijkqrstu" "e" ; ->ARU|| F1c0.mp5
"->ARU||camel.cfg" "" "bcefhijkurstu" "e" ; ->ARU||camel.cfg

"->ARU||[D]eagle_pro" "" "bcdefghijkrstuv" "e" ; ->ARU||[D]eagle_pro
"->ARU||Noisia^^" "" "bcefghiu" "e" ; ->ARU||Noisia^^
"->ARU|| Dj.NesQ1k" "" "abcdefghijkmnopqrstu" "e" ; ->ARU|| Dj.NesQ1k

"eSurf.From Nigeria" "" "bcdefghijkqrstu" "ce" ; eSurf.From Nigeria

"80.217.238.154" "" "abcdefghijklmnopqrsu" "de" ; |A^T| Papoose

"->ARU|| POw3R" "" "bcdefghijmnopqrstu" "e" ; *mAz0  # POw3R
"Papoose." "" "abcedfghijkmnopqrstu" "e" ; Papoose.

"eSurf # From Nigeria" "" "bcdefghijmnopqrstu" "e" ; eSurf # From Nigeria

"->ARU|| to#rk" "" "bcdefghijmnopqrstu" "e" ; ->ARU|| to#rk

;"STEAM_0:0:14574406" "" "bcdefghijkmnopqrstu" "ce"

And every time i do this i get the same result:

85.89.36.106
85.89.36.54
STEAM_0:0:14574406

this shouldnt be happening.

Share this post


Link to post
Share on other sites
AlmarM

What should happen?


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites
AlmarM

Uhm, no problem. :P

I guess :mellow:


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites
somdcomputerguy

I see you've already fixed it, but this is what I came up with..

#include <File.au3>
$i = 0
$count = _FileCountLines("users.ini")
$splitter = '"'
Do
    $i = $i + 1
    $read = FileReadLine("users.ini", $i)
    $string = StringRight($read, 1)
    ;if $string = $splitter then
    If $string <> "" Then
        $split = StringSplit($read, $splitter)
        ConsoleWrite($split[2] & @CRLF)
    EndIf
Until $count = $i
Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.