Immensee Posted January 20, 2008 Share Posted January 20, 2008 Heya , ive been using autoit for a long period now, but i can't understand this stupid command: MsgBox(0, "", _StringBetween("MAX", "M", "X")) Well, i want to get A here and let it show it with MsgBox(). But, using the _stringbetween command i get "", nothing. And in my real script i DO have #include string any help? Link to comment Share on other sites More sharing options...
Developers Jos Posted January 20, 2008 Developers Share Posted January 20, 2008 Heya , ive been using autoit for a long period now, but i can't understand this stupid command: MsgBox(0, "", _StringBetween("MAX", "M", "X")) Well, i want to get A here and let it show it with MsgBox(). But, using the _stringbetween command i get "", nothing. And in my real script i DO have #include string any help? It returns an Array. #include <String.au3> $x = _StringBetween("MAX", "M", "X") MsgBox(0, "",$x[0] ) 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. Link to comment Share on other sites More sharing options...
Immensee Posted January 20, 2008 Author Share Posted January 20, 2008 O_O... why it returns into an array... it doesn't make sense and the Help file didnt say that at all.... well thanks man , now i can AutoIt with fun again immense aka naruto Link to comment Share on other sites More sharing options...
therks Posted January 21, 2008 Share Posted January 21, 2008 (edited) It returns an array because it's capable of returning multiple values. #include <String.au3> $returns = _StringBetween('[Hello] [World]', '[', ']') For $val in $returns MsgBox(0, '', $val) Next *Edit: Also... Return Value Success: A 0 based $array[0] contains the first found string. Failure: 0 @Error: 1 = No inbetween string found. Edited January 21, 2008 by Saunders My AutoIt Stuff | My Github 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