HeidiR Posted December 20, 2008 Posted December 20, 2008 Hi All, Is it possible to use a reletive path with the Include statement? Example: #include<..\Lib\test.au3> Structure: G:\AU3\main.au3 G:\AU3\Lib I have tried a few different things but no luck. HeidiRFind free applications, code examples and more on my site at:http://heidisdownloads.com/
ProgAndy Posted December 20, 2008 Posted December 20, 2008 This structure should work: DIR\Main.au3 -> #include "Lib\lib1.au3" DIR\Lib\lib1.au3 -> #include "SubLibs\SubLib.au3" DIR\Lib\SubLibs\SubLib.au3 -> MsgBox(0,"","Works")Lib.zip *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
HeidiR Posted December 20, 2008 Author Posted December 20, 2008 This structure should work:DIR\Main.au3 -> #include "Lib\lib1.au3"DIR\Lib\lib1.au3 -> #include "SubLibs\SubLib.au3"DIR\Lib\SubLibs\SubLib.au3 -> MsgBox(0,"","Works")Yes! That worked! Thanks for your help. This clarification would make a great addition to Help. HeidiRFind free applications, code examples and more on my site at:http://heidisdownloads.com/
Moderators big_daddy Posted December 20, 2008 Moderators Posted December 20, 2008 Here is a more robust example of using relative paths. Relative.zip
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