Jump to content

Old Autoit'er looking for simple help


 Share

Recommended Posts

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

  • Developers

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

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 by Saunders
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...