Orca Posted September 19, 2004 Posted September 19, 2004 k i rarly ever use autoit, and dispise how i have to set arrays (prolly doin it nOOb style ) Dim $X_Array[7] $X_Array[1] = 84 $X_Array[2] = 122 $X_Array[3] = 164 $X_Array[4] = 205 $X_Array[5] = 246 $X_Array[6] = 287 is there a way to set each value more like in php //Setting arrays in php $variable = array('val1', 'val2', 'val3'); i super need a faster way because ill be settings arrays like super long and this would == " " - [G]oat | Kurusuki I AM ORCA!! A VERY POWERFUL WHALE!!!
Developers Jos Posted September 19, 2004 Developers Posted September 19, 2004 (edited) k i rarly ever use autoit, and dispise how i have to set arrays (prolly doin it nOOb style ) //Setting arrays in php $variable = array('val1', 'val2', 'val3'); <{POST_SNAPBACK}>//Setting arrays in php $variable = StringSplit("val1, val2,val3",","); Edited September 19, 2004 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.
Orca Posted September 19, 2004 Author Posted September 19, 2004 (edited) super thanks so much, i understand how it works and returns vars, but could you explain the purpose of the "," at the end? i dont understand what it means in the HelpFile explination Edited September 20, 2004 by SiC_Goat I AM ORCA!! A VERY POWERFUL WHALE!!!
CyberSlug Posted September 20, 2004 Posted September 20, 2004 The "," at the end indicates what separator character to use.... Alternatives: StringSplit("val1/val2/val3", "/"); StringSplit("val1Xval2Xval3", "X"); Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
emmanuel Posted September 20, 2004 Posted September 20, 2004 The "," at the end indicates what separator character to use.... Alternatives: StringSplit("val1/val2/val3", "/"); StringSplit("val1Xval2Xval3", "X"); <{POST_SNAPBACK}>I like "|" since it can't be used in filepaths... "I'm not even supposed to be here today!" -Dante (Hicks)
ezzetabi Posted September 20, 2004 Posted September 20, 2004 I like @cr since it can't be used in single line strings. And often it is not even used in more than one lines strings. Also {tab} is good, since it does not need concatenating. $eg = StringSplit('one{tab}two{tab}three{tab}four{tab}five','{tab}') While @cr needs: $eg2 = StringSplit('six' & @cr & 'seven' & @cr & 'eight' & @cr & 'nine',@cr)
emmanuel Posted September 20, 2004 Posted September 20, 2004 I like @cr since it can't be used in single line strings. And often it is not even used in more than one lines strings. Also {tab} is good, since it does not need concatenating. $eg = StringSplit('one{tab}two{tab}three{tab}four{tab}five','{tab}') While @cr needs: $eg2 = StringSplit('six' & @cr & 'seven' & @cr & 'eight' & @cr & 'nine',@cr) <{POST_SNAPBACK}>Good points, thanks for the tip. "I'm not even supposed to be here today!" -Dante (Hicks)
Orca Posted September 20, 2004 Author Posted September 20, 2004 OHHHHHHHHH! Now i get it, the "," at the end just declares what in the first part will be the thing seperating each var, in php each var is sepereated by a comma only... - [G]oat | Kurusuki I AM ORCA!! A VERY POWERFUL WHALE!!!
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