botanic Posted September 1, 2007 Posted September 1, 2007 (edited) how can I go about setting the bold text below into a set of variables from a txt file? 2: 1: 0 |(Off) Note | chan= 1 | pitch=e 4 |On Note | chan= 1 | pitch=D 4 | vol=110 Edited September 1, 2007 by botanic
Zedna Posted September 1, 2007 Posted September 1, 2007 (edited) $line = "2: 1: 0 |(Off) Note | chan= 1 | pitch=e 4" $line = StringSplit($line,"|") $a = $line[1] $b = $line[2] $c = GetValue($line[3]) $d = GetValue($line[4]) Func GetValue($text) $text = StringSplit($text,"=") Return $text[2] EndFunc Edited September 1, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
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