botanic Posted September 2, 2007 Share Posted September 2, 2007 (edited) how can i get the value of the number after the BPM= I know i could use string mid however the number of characters on each side could change as well as the BPM could be less then 100 |Tempo | BPM=110 | micros\quarter=545454 Edited September 2, 2007 by botanic Link to comment Share on other sites More sharing options...
Zedna Posted September 2, 2007 Share Posted September 2, 2007 Look here Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
botanic Posted September 2, 2007 Author Share Posted September 2, 2007 I also know i could string split after the BPM= just how do i tell the program that if character 3 is not a number to just use the first 2 characters? Link to comment Share on other sites More sharing options...
Nahuel Posted September 2, 2007 Share Posted September 2, 2007 Look:#include <string.au3> $oRstring="|Tempo | BPM=110 | micros\quarter=545454"&" " $String1=_StringBetween($oRstring,"="," ") $String2=_StringBetween($oRstring,"quarter="," ") MsgBox(0,"",$String1[0]) MsgBox(0,"",$String2[0])Note the &" " I added at the end of your string. Link to comment Share on other sites More sharing options...
botanic Posted September 2, 2007 Author Share Posted September 2, 2007 thanks it works great ^.^ Link to comment Share on other sites More sharing options...
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