Jump to content

Recommended Posts

Posted

Is there a certain syntax I need to follow for functions that aren't in the same au3 file as the program that uses them? They work perfectly inside the same au3 file but when I move them to their own they don't show up like _IECreate or _ArrayDisplay or GUICtrlRead or any other pre-made functions. What am I doing wrong?

Posted (edited)

Both au3 files are in the same folder and what I mean is that normally when you start to type a function autocomplete gives a list of recomendations and when you're done typing the function turns blue, that doesn't happen with mine.

Edit: I know one of you is going to ask for the error given and it's "Undefined Function"

Edited by dbzfanatic
Posted (edited)

Both au3 files are in the same folder and what I mean is that normally when you start to type a function autocomplete gives a list of recomendations and when you're done typing the function turns blue, that doesn't happen with mine.

Edit: I know one of you is going to ask for the error given and it's "Undefined Function"

Heres an example of what the Main file and the Second(File with ur functions) would look like. Put them in same folder

Hope this helps

Main.au3

#include <Second.au3>
_NewFunc()

Second.au3

#include-once
#region _New
Func _NewFunc()
      Test
EndFunc
#endregion
Edited by frostfel
Posted (edited)

:) I think I forgot to put the #endregion in the 2nd au3 file w/ the acutal functions...

Edit: nope, just tried it, still getting that freaking "Undefined Function" error.

Edit to the Edit: sorry, it does work I forgot to reinclude the 2nd au3 file too :) man I'm out of it today. Thanks a lot guys/girls.

Edited by dbzfanatic
Posted

:) I think I forgot to put the #endregion in the 2nd au3 file w/ the acutal functions...

Yeah I forget sometimes too dont forget to start the region also exp. #region _New

Posted

??? Regions don't actually do anything. They're only used with Scite. They don't have any real impact on AutoIt code, they're just for organizational purposes.

Just try running this code:

#endregion
msgbox(0,0,'hi there')
#endregion
#region

And you'll see that nothing strange happens.

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
  • Recently Browsing   0 members

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