blizzedout Posted July 28, 2006 Posted July 28, 2006 Ok i have a bunch of lines that are like this:Amount=89283">and place this into an array: 89283
Moderators SmOke_N Posted July 28, 2006 Moderators Posted July 28, 2006 Ok i have a bunch of lines that are like this:Amount=89283">and place this into an array: 89283And the question is?You could use StringSplit()or _StringBetween() (In Scripts and Scraps just do a search for it)or _SRE_Between() (Around in support, again do a search) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Bert Posted July 28, 2006 Posted July 28, 2006 Do you need only the numbers in the string? The Vollatran project My blog: http://www.vollysinterestingshit.com/
Moderators SmOke_N Posted July 28, 2006 Moderators Posted July 28, 2006 $string = 'Amount=89283"> blah blah blah Amount=10">' $Array = _SRE_Between($string, 'Amount=', '">', 1) If IsArray($Array) Then For $i = 0 To UBound($Array) - 1 MsgBox(64, 'Info:', $Array[$i]) Next EndIf Func _SRE_Between($s_String, $s_Start, $s_End, $i_ReturnArray = 0); $i_ReturnArray returns an array of all found if it = 1, otherwise default returns first found $a_Array = StringRegExp($s_String, '(?:' & $s_Start & ')(.*?)(?:' & $s_End & ')', 3) If Not @error And Not $i_ReturnArray And IsArray($a_Array) Then Return $a_Array[0] If IsArray($a_Array) Then Return $a_Array EndFunc Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Bert Posted July 28, 2006 Posted July 28, 2006 @Smoke_N....Dude, you are just too fast and good at this sort of thing. The Vollatran project My blog: http://www.vollysinterestingshit.com/
blizzedout Posted July 28, 2006 Author Posted July 28, 2006 (edited) wow... perfect! thanks! Edited July 28, 2006 by blizzedout
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