TechShock Posted August 31, 2018 Share Posted August 31, 2018 Other than seeing it (and ignoring it, sometimes) within the helpfile, is there an quicker and easier way to tell when an include is needed? I spent a little time trying to debug some code before realizing I was missing the include all along. I can see the general error, error: %MacroName% undefined function, when I compile, but in my case I didn't bother looking at the top of the script (2,500 lines of code) to see if the include (UDF ?) was included. Link to comment Share on other sites More sharing options...
Deye Posted August 31, 2018 Share Posted August 31, 2018 (edited) TechShock, Welcome to the AutoIt forum I just made up this tool that might be relevant for you try : Not only that: It can list the includes without paging up to look if they exist if it is customarily used and considering the needed includes and other files exist in one configured location, the tool simply imports to the used script directory, all needed missing includes and files For now it won't tell you off missing files maybe I will add that at a later stage.. Deye Edited August 31, 2018 by Deye Link to comment Share on other sites More sharing options...
Simpel Posted August 31, 2018 Share Posted August 31, 2018 Hi. I use a tool that organizes the includes: https://www.autoitscript.com/forum/topic/111554-organize-includes-in-scite4autoit3/?tab=comments#comment-782390. That shows you which includes are missing and which you can delete. Simpel SciTE4AutoIt = 3.7.3.0 AutoIt = 3.3.14.2 AutoItX64 = 0 OS = Win_10 Build = 19044 OSArch = X64 Language = 0407/german H:\...\AutoIt3\SciTE H:\...\AutoIt3 H:\...\AutoIt3\Include (H:\ = Network Drive) Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. Link to comment Share on other sites More sharing options...
BrewManNH Posted August 31, 2018 Share Posted August 31, 2018 Inside SciTE, if you use it, you can run AU3Check, this will do a quick check of your code to see if you've made any mistakes. It will immediately tell you if you've used a function from a UDF that you haven't added to the script because it won't know about that function. It won't tell you which UDFs you've added that aren't needed, but at least you will know what is missing. Also, remember most of the bigger UDFs will have #include lines for other UDFs and you may end up referencing them several times, but if they're AutoIt standard includes, they will only be added once because of the directive #include-once in them If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator 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