xzaz Posted January 27, 2008 Share Posted January 27, 2008 $Split = stringSplit($line,"<") $Output = "" For $i = 1 to $Split[0] if $i = 1 Then $NextChar = StringLeft($Split[$i],1) If $NextChar = "/" Then $Output &= $Split[$i] Else $Output &= $Split[$i] EndIf Else $NextChar = StringLeft($Split[$i],1) If $NextChar = "/" Then $Output &= "<"&$Split[$i] Else $Output &= @CRLF&"<"&$Split[$i] EndIf Endif Next _GUICtrlEdit_SetText($EditFile,$Output)Alright i want to sort This! file. That works, but now i want to copy the first <RLPoint></RLPoint> After the <RedLine>. Im confused. I am sure i need to check the string (i'v put them in a array) if the string is <RLPoint> copy and past the next id.Could someone give me a punsh into the right direction? Tnx! Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
rasim Posted January 27, 2008 Share Posted January 27, 2008 You need this? $source = FileRead("c:\helekaart.mrk") $aString = StringRegExp($source, "^.*(<RLPoint.*</RLPoint>)", 1) MsgBox(0, "", $aString[0]) Link to comment Share on other sites More sharing options...
xzaz Posted January 27, 2008 Author Share Posted January 27, 2008 (edited) Tnx for the answer, its not quite what i needed but it comes in the right direction. I never used StringRegExp yet. I will go and check that. The thing i want:the file i was provided was wrong that file only containd 1 <RedLine> i uploaded an other one witch got mutiple <RedLine>'s in it. After every <RedLine> there are <RLPoint>'s. I need the first <RLPoint> after every <RedLine>. Hope this is clear, can't explane it better. Tnx for helping again! I realy appreciateit.Edit: o the file: download Edited January 27, 2008 by xzaz Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
xzaz Posted January 27, 2008 Author Share Posted January 27, 2008 Dmn i cant figure it out.. is there anyone? Small Color Picker v0.2 | Travian bot 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