SaguratuS Posted September 29, 2005 Posted September 29, 2005 (edited) Well, I have a slight problem - I need to turn this string into an array. 2207.0 0.07 12.2 257 239 249 473 Spacing varies between the variables, and are most unfortunately not tabs. Here's an example 2207.0 10.07 112.2 257 51239 249 473 2208.0 0.07 12.2 257 239 249 473 2209.0 0.07 12.2 57 39 249 73 Any ideas, orr is this simply a dead end? Edit: Spacing isn't showing up even as CODE, but there entire line is X characters long (with about 8-10 spaces inbetween each value) regardless of the numbers. Edited September 29, 2005 by SaguratuS
Developers Jos Posted September 29, 2005 Developers Posted September 29, 2005 (edited) Something like ? : $Var = "2207.0 0.07 12.2 257 239 249 473" While StringInstr($var, " ") $var = StringReplace($var, " ", " ") ; doesn;t show but first " " has 2 spaces ... second " " has one Wend $array = stringsplit($var," ") Edited September 29, 2005 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
SaguratuS Posted September 29, 2005 Author Posted September 29, 2005 Something like ? :$Var = "2207.0 0.07 12.2 257 239 249 473" While StringInstr($var, " ") $var = StringReplace($var, " ", " ") ; doesn;t show but first " " has 2 spaces ... second " " has one Wend $array = stringsplit($var," ")Ah, didn't even think about using while to do the job - Thanks a ton!
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