Jump to content

Reference custom functions from a different au3 file


dbzfanatic
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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

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

:) 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
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...