Jump to content

Recommended Posts

Posted

Its just weird I'm taking a .tmp file and using stringsplit to separate strings formatted like

Earthling_Planet_Human_Squater_Beard

And using "_" as the delimiter not only does it drop the r's on the ends it does it in the middle of a word.  Like Beard would be saved as Bead...literally all I'm doing is taking a proper string from a filereadtoarray() and then looping through the array using stringsplit.  

Posted (edited)
$array = FileReadToArray("Helper.tmp")   ;reads file to array
        for $i = 0 to UBound($array)-1
            if $array[$i]<>"" Then
                $stringarray = StringSplit($array[$i], "_")  ;removes the "_"'s'
                    ;2 flag is nocount, [1] is first actual string
            if UBound($stringarray)=0 Then          
                MsgBox('','',"stringarray[]=0")
            EndIf
            Endif
            
            for $l=5 to UBound($stringarray)-1 ;this just sends the contents of $string array
                Send($stringarray[$l] & " ")
            Next 
            next

 

Edited by markyrocks
Posted (edited)

@markyrocks
I don't know what you're talking about :)

#include <Array.au3>

Global $strString = "Earthling_Planet_Human_Squater_Beard" ; "I'm_a_string_with_r._Wrar_!", _
       $arrStringSplitted = StringSplit($strString, "_", BitOR($STR_NOCOUNT, $STR_ENTIRESPLIT))

_ArrayDisplay($arrStringSplitted, "String Splitted")

Result:
image.png.339f5cfb42c3f4f971490a0000b0c1bd.png

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

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
×
×
  • Create New...