Sign in to follow this  
Followers 0
Ghost21

Array's & stringbetweet

5 posts in this topic

I have been trying to get this line . |joist|22|DJ1|Lumber-2x||||||8.000|06-11-03||||||JOIST|

Too split up into multiable arrays . I can get to open the file read the line but I can't get the info IN BETWEEN the " | " to goto an Array[0] [1] [2] and so on.

A kick in da ass in the right direction would be greatly appreciated... " OUCH "

Thanks :whistle:

Share this post


Link to post
Share on other sites



Like this

$Array = StringSplit("|joist|22|DJ1|Lumber-2x||||||8.000|06-11-03||||||JOIST|", "|")

For $x = 1 To $Array[0]
    If $Array[$x] = "" Then ContinueLoop
    MsgBox(0x0, "My Array", $Array[$x], 2)
Next

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Now in the middle of the line it show ||||| can we assign an array to those even if it finds nothing ????

Share this post


Link to post
Share on other sites

Now in the middle of the line it show ||||| can we assign an array to those even if it finds nothing ????

You mean it doesn't already ?

$Array = StringSplit("|joist|22|DJ1|Lumber-2x||||||8.000|06-11-03||||||JOIST|", "|")

For $x = 1 To $Array[0]
    MsgBox(0x0, "My Array", $Array[$x], 2)
Next

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Yeah sorry .. I had to set it to display the count number and I saw it counting right... Thankyou very much...

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  
Followers 0