dufran3 Posted July 3, 2007 Share Posted July 3, 2007 (edited) I am having problems with includes in the newest version of AutoIt. Every script that I have made now doesn't work if I recompile it with the new version. For some reason, it isn't including all the #includes when compiling to an .exe. Is this a version bug? Edit: I can compile the exact same script with both versions, and the newest version has errors with the includes. 3.2.2.0 compiles it correctly. Edited July 3, 2007 by dufran3 Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted July 4, 2007 Share Posted July 4, 2007 If you used includes that you downloaded from the forums like the A3lib be sure you put them in the new autoit include directory. My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
dufran3 Posted July 9, 2007 Author Share Posted July 9, 2007 These are custom includes. They are located in the same dir as the main script. Link to comment Share on other sites More sharing options...
/dev/null Posted July 9, 2007 Share Posted July 9, 2007 I am having problems with includes in the newest version of AutoIt. Every script that I have made now doesn't work if I recompile it with the new version. For some reason, it isn't including all the #includes when compiling to an .exe. Is this a version bug?Edit: I can compile the exact same script with both versions, and the newest version has errors with the includes. 3.2.2.0 compiles it correctly.1) what's the error?2) how does your #include statement look like? __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
DW1 Posted July 9, 2007 Share Posted July 9, 2007 (edited) you have already been told.... put them in the new autoit include directory Edit: typo Edited July 9, 2007 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
MHz Posted July 9, 2007 Share Posted July 9, 2007 (edited) you have already been told.... put them in the new autoit include directory Edit: typoIncludes will be searched within the same directory as the main script. If you have a script named "test.au3" and have a script named "testinclude.au3" in the same directory, then using this code works fine for me. test.au3 #include <testinclude.au3>oÝ÷ Ú׬¶)Üç^jíÚºÚ"µÍÚ[ÛYK[ÛÙBÙÐÞ ÌÎNÝÝ ÌÎNË ÌÎNÓÒÉÌÎNÊ Edit: Fixed code Edited July 9, 2007 by MHz Link to comment Share on other sites More sharing options...
DW1 Posted July 9, 2007 Share Posted July 9, 2007 Ah, perhaps this is what he is missing? "#include-once" From the include au3? AutoIt3 Online Help Link to comment Share on other sites More sharing options...
/dev/null Posted July 9, 2007 Share Posted July 9, 2007 Ah, perhaps this is what he is missing?"#include-once"From the include au3?Or perhaps this is what is missing.#include <wecanonlyspeculateuntilhedoesnotprovidefurtherinformation.au3> __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
MHz Posted July 9, 2007 Share Posted July 9, 2007 Ah, perhaps this is what he is missing?"#include-once"From the include au3?"#include-once" is just a directive so the include is not added a 2nd time. It has little to do with searching for includes. Link to comment Share on other sites More sharing options...
dufran3 Posted July 9, 2007 Author Share Posted July 9, 2007 (edited) #include <Log_Functions.au3> The Log_Functions.au3 include is in the same directory as the script that is including it. I also tried including ButtonConstants.au3 and GuiConstantsEx.au3 and the script could not evaluate the variables in that script after being compiled. The error I am receiving varies. If I have a script...for example...here...I will write one really quick...hold for more... Edited July 9, 2007 by dufran3 Link to comment Share on other sites More sharing options...
dufran3 Posted July 9, 2007 Author Share Posted July 9, 2007 hmmm... Main script... ;This is a test #include <include.au3> MsgBox(0,'Testing','This is the first messagebox, it is in the main script') _IncludeMessageBox()oÝ÷ Ú)Üç^~)^jëh×6Func _IncludeMessageBox() MsgBox(0,'Include Message Box','This is the message box in the include file') EndFunc And it works. For some reason, in almost every script I have created previous to the newest autoit version, I get an error with any custom function or variable that is supposed to be included....ONLY AFTER THE SCRIPT IS COMPILED. Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 9, 2007 Share Posted July 9, 2007 Hi, I tried to write a script for manageing includes. Maybe it is worth a try ... See my sig. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
dufran3 Posted July 9, 2007 Author Share Posted July 9, 2007 Just tried completely uninstalling autoit. Restarting, and re-downloading and re-installing. Still having same problem. Link to comment Share on other sites More sharing options...
dufran3 Posted July 9, 2007 Author Share Posted July 9, 2007 It is so weird. If I open up my script with scite and run it, it works fine. If I compile it. It doesn't see anything in the includes. Link to comment Share on other sites More sharing options...
weaponx Posted July 9, 2007 Share Posted July 9, 2007 Can you post a broken script with the desired file to be included? Link to comment Share on other sites More sharing options...
dufran3 Posted July 9, 2007 Author Share Posted July 9, 2007 (edited) Found out the problem. I had a main script. Main.au3 In that script I had an #include file...which was a list of all my functions. Functions.au3 In that script I had an #include file...which handled all my logging. Log_Functions.au3 All the errors were coming from the Log_functions.au3. To resolve the problem. I had to change the #include from the functions.au3 file to the main.au3 file. Is there a problem including an include? The structure of the includes looks like this Main.au3 Functions.au3 Log_Functions.au3 Do you get me? Edited July 9, 2007 by dufran3 Link to comment Share on other sites More sharing options...
/dev/null Posted July 9, 2007 Share Posted July 9, 2007 It is so weird. If I open up my script with scite and run it, it works fine. If I compile it. It doesn't see anything in the includes. well, I tried it here. Works as described in the help file: The search order used by AutoIt depends on which form of #include you use. The tables below show the order directories are searched using both forms. Using #include <> Standard library The path of the currently running interpreter with "\Include" appended is searched. User-defined libraries The registry value mentioned above is read and each directory is searched in the order they appear in. Script directory The directory of the currently executing script. Using #include "" (This is the reverse of #include <>). Script directory The directory of the currently executing script. User-defined libraries The registry value mentioned above is read and each directory is searched in the reverse order they appear in. Standard library The path of the currently running interpreter with "\Include" appended is searched. I tested with this: 1.) Create d:\temp\au3\test.au3 #include <inc.au3> MsgBox(0,"","IN Script") 2.) Create d:\temp\au3\inc.au3 MsgBox(0,"","IN INCLUDE") It shows BOTH MsgBox() windows if run via SciTe or compiled to exe, so must be a problem on your system. Unless you provide the error message and two reproduction scripts, nobody can help you! __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
dufran3 Posted July 9, 2007 Author Share Posted July 9, 2007 You are one include short. My problem is going 3 deep. It doesn't look like I can reproduce it with a little msgBox script though. C:\temp\Main.au3 ;This is a test #include <include.au3> MsgBox(0,'Testing','This is the first message box, it is in the main script') _IncludeMessageBox() _IncludeMessageBox2()oÝ÷ ÙÍ=Úצ§Ovw%¹×¶jíÚºÚ"µÍ[ÈÒ[ÛYSYÜØYÙPÞ BSÙÐÞ ÌÎNÒ[ÛYHYÜØYÙHÞÌÎNË ÌÎNÕÈÈHYÜØYÙHÞ[HÜ[ÛYH[IÌÎNÊB[[ now the problem was calling that _IncludeMessageBox2() function, that is where it was hanging up. I can't reproduce it using this simple script however...hrmmm.. Link to comment Share on other sites More sharing options...
/dev/null Posted July 9, 2007 Share Posted July 9, 2007 I can't reproduce it using this simple script however...hrmmm..still. What's the error message when you compile the script? __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
dufran3 Posted July 9, 2007 Author Share Posted July 9, 2007 (edited) I don't think you understand. The error message is always referring to a variable or custom function. For example. If you compile that script. But take out the include. It will give you an error because it cannot find the function. However, I have resolved it by including all files in the main .au3 file. it would give me that error for each function/variable that was included in the include... C:\Script Tests\MsgBox\main.au3 (5) : ==> Unknown function name.: _IncludeMessageBox() ^ ERROR Edited July 9, 2007 by dufran3 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