brodie28 Posted September 24, 2008 Share Posted September 24, 2008 (edited) So I just updated my autoit and beta to the latest versions using the automatic updater. My script was just bringing up loads of errors about variables being used before declaration. Most of these variables were used in the GUI, like $ES_AUTOHSCROLL and $W_HWIND. I looked through the helpfile and ended up just adding loads of include files that I found when searching for the variables now bringing up errors. My script now uses the following include files. #include <GUIConstants.au3> #include <IE.au3> #include <Date.au3> #Include <File.au3> #Include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <StaticConstants.au3> #Include <GuiEdit.au3> #Include <GuiComboBox.au3> #Include <String.au3> This fixed all the errors, but I dont know which ones I actually need now.... Can anyone help me understand why this happened and how I can remove unnecessary includes? EDIT: Through trial and error I discovered the script only needs the following includes to run: #include <GUIConstants.au3> #include <IE.au3> #include <Date.au3> #Include <File.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #Include <GuiComboBox.au3> #Include <String.au3> So because of the update, the script now requires the following includes which it did not need before the update: #include <WindowsConstants.au3> #include <EditConstants.au3> #Include <GuiComboBox.au3> Can anyone tell me why? Edited September 24, 2008 by brodie28 Link to comment Share on other sites More sharing options...
martin Posted September 24, 2008 Share Posted September 24, 2008 So I just updated my autoit and beta to the latest versions using the automatic updater. My script was just bringing up loads of errors about variables being used before declaration. Most of these variables were used in the GUI, like $ES_AUTOHSCROLL and $W_HWIND.I looked through the helpfile and ended up just adding loads of include files that I found when searching for the variables now bringing up errors. My script now uses the following include files.#include <GUIConstants.au3>#include <IE.au3>#include <Date.au3>#Include <File.au3>#Include <WinAPI.au3>#include <GUIConstantsEx.au3>#include <WindowsConstants.au3>#include <EditConstants.au3>#include <StaticConstants.au3>#Include <GuiEdit.au3>#Include <GuiComboBox.au3>#Include <String.au3>This fixed all the errors, but I dont know which ones I actually need now.... Can anyone help me understand why this happened and how I can remove unnecessary includes?Read the history in the help and read the sticky at the top oif this forum. Instead of lots of unnecessary includes being in one big include they have been split up into more logical files. You have duplicated GuiConstants.au3 because that is replaced by GuiConstantsEx.au3 so remove it. The rest are possibly needed but if you comment one out and there are no errors then it is not needed.Have a look at this. 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...
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