AdmiralAlkex Posted March 11, 2008 Share Posted March 11, 2008 Lets say I have my script in C:\Script\Bin\ and the file I want to include is in C:\Script\Include\ How can I include the file without hard-coding the path?? (or can't I??) .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
martin Posted March 11, 2008 Share Posted March 11, 2008 Lets say I have my script in C:\Script\Bin\ and the file I want to include is in C:\Script\Include\How can I include the file without hard-coding the path?? (or can't I??)From the help for #includeThere is a special registry value that can be created at "HKEY_CURRENT_USER\Software\AutoIt v3\AutoIt" called "Include". It should be a REG_SZ (string) value. The contents of this value are a semi-colon delimited list of directories that should be searched for files when resolving #include's in addition to the standard locations. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 11, 2008 Developers Share Posted March 11, 2008 You need to code at least the relative path. something like this should do it : #include"..\include\yourfile.au3" 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 More sharing options...
DW1 Posted March 11, 2008 Share Posted March 11, 2008 (edited) From the help file:There is a special registry value that can be created at "HKEY_CURRENT_USER\Software\AutoIt v3\AutoIt" called "Include". It should be a REG_SZ (string) value. The contents of this value are a semi-colon delimited list of directories that should be searched for files when resolving #include's in addition to the standard locations.EDIT: This will allow you to call #include and have it search additional directories, but those have to be hard coded in the registry.EDIT2: Sorry Martin, didn't see that you already posted this. Edited March 11, 2008 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted March 11, 2008 Author Share Posted March 11, 2008 Thank you all three but Jos solution seems better so I will stick to that for the moment .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
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