Jump to content
Sign in to follow this  

Please explain @extend to a newbie

Recommended Posts


Just started getting to grips with AutoIt and though I'm so far completely crap I am enjoying what is for the moment a steep learning curve.

Could someone please explain or point me in the direction of an explanation of the'@extended' macro - a search in the forums yields nothing and the help file is scant and cryptic to say the least. There is a suggestion that it has some use in collaboration with stringReplace (exactly what is unclear) but it also seems to return the number of tables on an IE page.


Share this post

Link to post
Share on other sites

If a function has to return more than one value there are a few options:

Returning an array,

Using ByRef parameters,

Global variables,

Setting @extended,

Setting @error

Possible ones I forgot.

Which is used depends on the function and the type of information returned. For the purpose of returning integers @extended is quite a nice solution.

StringReplace is just one example of a function that uses @extended to return an integer variable.

Hope that's clear and correct as it's just what I derived from what I've seen.

Share this post

Link to post
Share on other sites

Hi and Welcome to the forums!

Every function can set @error or @extended to a number by using SetError() or SetExtended(). So if you want to know what they mean look at the documentation or the source.

Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.