Levignot Posted April 30, 2010 Share Posted April 30, 2010 (edited) Good day! Sorry about my english. I would like to create my own library with the functions that I use in most of my scripts. I don't know if it is possible, maybe some one can throw me any clue about. The idea is to make a script (? library?), with many functions, and call this functions from my others scripts. Thanks in advance for any help. Edited April 30, 2010 by Levignot Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 30, 2010 Moderators Share Posted April 30, 2010 Levignot,What you are looking for is a personal include folder. AutoIt looks for #include files in 3 places:- 1. C:\Program Files\AutoIt3\Include (if you have a standard installation).- 2. A user-defined folder (which is what you want). - 3. The script folder.So how do you tell Autoit where the user-defined folder is? Two ways to do it:- 1. If you run the full SciTE4AutoIt3 package, you can use "SciTE Config" from the <Tools> menu to set the folder. (If you do not have the full package, then I recommend that you download it from here and install it. You get a load of goodies to help you code in AutoIt. )- 2. Or you can edit the registry directly. As it says in 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.Once you have defined the user-defined folder, you will need to save files containing the functions that you want in that folder. Then when you need a function, you can simply #include the relevant file.I hope that is all clear - ask if not. M23Avec un nom pareil je presume que tu es francophone. Envoie-moi un PM en francais si tu ne comprends pas. Trans: With that forum name I assume you speak French. Send me a PM in French if you do not understand. GoogleGonnaSaveUs 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...
Levignot Posted April 30, 2010 Author Share Posted April 30, 2010 (edited) Thanks so much! I've just keep searching and found the include "method". It's clear in help, but with your explication i've understand it even better. If someone looks here, I recomend for search the function include in help, but anyway I've the example of the help: ;;;SCRIPT= TIME.aue3;;; #include-once Func myFunc() MsgBox(0,"", "Hello from library.au3") EndFunc ;;; SCRIPT.AU3 ;;; #include "TIME.au3" myFunc() Exit One more time, Thanks! For your fast and "accuracity" reply. PD: Sorry, I'm spanish, and my knowlegde about french is horrible unfortunally. P.P.D: Now I understand better your great reply. I've make my own folder and put there some files, It works great! Thanks! Edited April 30, 2010 by Levignot 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