Schoening Posted January 14, 2012 Share Posted January 14, 2012 ... that is the question. Thanks to all the epic support, and my genius (ha) (Mostly support and Reading ) I have over 200 lines of so far.. Now i have about 10 functions, more coming.. Should i use include? and Run the functions from separate files? Is that the whole point of including? Is #include speeding up the program? Or is it all just to be Neat and Tidy? (Which i would prefer if it is not slowing down the Program) Link to comment Share on other sites More sharing options...
ProgAndy Posted January 14, 2012 Share Posted January 14, 2012 #include is used to separate in logical (maybe reusable) units. Before execution or compilation, AutoIt scans for #include-directives and replaces them with the content of the file. *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 Link to comment Share on other sites More sharing options...
Schoening Posted January 14, 2012 Author Share Posted January 14, 2012 (edited) #include is used to separate in logical (maybe reusable) units.Before execution or compilation, AutoIt scans for #include-directives and replaces them with the content of the file.Since i am only using functions , and functions i reuse, its too keep track of things you mean right? Thx (Danke) Edited January 14, 2012 by Schoening Link to comment Share on other sites More sharing options...
MilesAhead Posted January 14, 2012 Share Posted January 14, 2012 Include files make it easier to reuse code in multiple programs. You only need to maintain the one file instead of functions pasted into every app. The down side is if you want to give the user the source code, they may have to chase down a bunch of include files. This can be confusing to non-programmers. That said I'm all for general-purpose include files. Also if you use SciTE in Tools menu you can use User Calltip Entries to enter the signatures for your functions. When you start typing the params will show as IntelliSense. It saves a lot of aggravation. I used to keep my include files as tabs so I could go look at the function params until I discovered the Calltips file. My Freeware Page Link to comment Share on other sites More sharing options...
Schoening Posted January 14, 2012 Author Share Posted January 14, 2012 Include files make it easier to reuse code in multiple programs. You only need to maintain the one file instead of functions pasted into every app. The down side is if you want to give the user the source code, they may have to chase down a bunch of include files. This can be confusing to non-programmers.That said I'm all for general-purpose include files. Also if you use SciTE in Tools menu you can use User Calltip Entries to enter the signatures for your functions. When you start typing the params will show as IntelliSense. It saves a lot of aggravation. I used to keep my include files as tabs so I could go look at the function params until I discovered the Calltips file.Thx for the Tip, i have no Clue what the User Calltip Entries do atm, but i give it a try ! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 14, 2012 Moderators Share Posted January 14, 2012 Schoening,User CallTips are the syntax reminders you get in SciTE when you start filling in the parameters for a function. If you want to know how to add your own functions to the list, take a look at the Adding UDFs to AutoIt and SciTE tutorial in the Wiki. M23 jvanegmond 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Schoening Posted January 14, 2012 Author Share Posted January 14, 2012 Schoening,User CallTips are the syntax reminders you get in SciTE when you start filling in the parameters for a function. If you want to know how to add your own functions to the list, take a look at the Adding UDFs to AutoIt and SciTE tutorial in the Wiki. M23Thx ! i think this will be very usefull ! I have tried to do several PixelSearch in several areas to find the right pixel and determine which one is closest to the Center of the Screen..It did not work very well.But then i found this:The most basic function allows you to find the pixel in a given color - as PixelSearch - but instead of returning the first found, it returns the closest to a given point.Exactly what i need ! Is the Wiki Tutorial adding those files for me? Because i am not sure if it is. In the Download from the Link there are: fastfind.dll and fastfind64.dll and 3 Au3 files. FastFind.au3, and two .au3 that i belive are examples of Fastfind.I am not 100 % shure if i am supposed to put all files into a new map or just some.Will i just #Include <fastfind.au3> in the future to use all its functions ? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 15, 2012 Moderators Share Posted January 15, 2012 Schoening,You need to create a folder to hold your downloaded UDFS (and any you create yourself). The tutorial tells you how to get AutoIt and SciTE to recognise that folder as a valid #include folder. You still need to put the UDF files into that folder, but once in there you can use them just as you would the standard #include files that are installed with AutoIt. You will still need to add all the functions in the UDF to the files mentioned in the tutorial if you want them to be colour-coded and have User CallTips. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
ProgAndy Posted January 15, 2012 Share Posted January 15, 2012 Another way is to put the include in the same folder as you main script. Do that if you have includes only meant for one special script. If an include contains DLLs, they have to be in the same folder as your main script, or in %PATH%. Sometimes, it is possible to specify the full DLL-path in a function like _UDFNAME_Startup(), too. *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 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