shanet Posted December 18, 2010 Share Posted December 18, 2010 (edited) Hey guys, just wondering if there are any leadins/walkthroughs on UDF creation? Thanks, shanet Edited December 20, 2010 by shanet [font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS: %programfiles%/AutoIt3/autoit3.chm Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 18, 2010 Moderators Share Posted December 18, 2010 shanet,Take a look here.The UDF scripts in my sig meet the requirements (or at least I hope so!) - feel free to use them as templates if you wish. 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...
shanet Posted December 18, 2010 Author Share Posted December 18, 2010 shanet,Take a look here.The UDF scripts in my sig meet the requirements (or at least I hope so!) - feel free to use them as templates if you wish. M23Thanks Melba23I shall read that shanet [font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS: %programfiles%/AutoIt3/autoit3.chm Link to comment Share on other sites More sharing options...
shanet Posted December 18, 2010 Author Share Posted December 18, 2010 Melba23, thankyou for that, however I am looking for tutorials at the moment however I will keep that in mind and refer to it when I start creating UDFs. Are there any simple UDFs that anyone could suggest I look at to get an idea on how a UDF is made? Thanks [font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS: %programfiles%/AutoIt3/autoit3.chm Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 18, 2010 Moderators Share Posted December 18, 2010 shanet,A UDF is just a function or set of functions that is held in an #include file. Take a look at one of the standard includes (press Alt-I when the cursor is on an #include line in SciTE) and you will see that some are very short while others can run into hundeds of lines.So to write a UDF all you have to do is decide what you want to code - there is no magic about it, they are just normal AutoIt functions, so no tutorials exist other then those dealing with AutoIt as a whole. I started by writing functions that I used a lot - that way I could include them and not have to type them out each time. Some of them became the UDFs in my sig, but many others just live in my Include folder so that I can use them when required. So what sort of functions do you find yourself using frequently? Putting them into formal #include format is a good way to force yourself to write well-structured code and then you can post them in the Examples section. 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...
shanet Posted December 19, 2010 Author Share Posted December 19, 2010 So what sort of functions do you find yourself using frequently? Putting them into formal #include format is a good way to force yourself to write well-structured code and then you can post them in the Examples section. So what you mean by that is just go around to the UDF's and steal the functions I use regularly to get practice at making my own UDFs?shanet [font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS: %programfiles%/AutoIt3/autoit3.chm Link to comment Share on other sites More sharing options...
water Posted December 19, 2010 Share Posted December 19, 2010 So what you mean by that is just go around to the UDF's and steal the functions I use regularly to get practice at making my own UDFs?shanetWhat Melba means (at least I understand it this way ): If you have functions written by yourself that are called from a lot of your scripts, then put them into your UDF and #include them where they are needed.If you have functions written by someone else which aren't a part of an UDF already, put them into your UDF and #include them where they are needed. Most code snippets posted on the forum can be used freely.If the UDF written by you might be of use to someonelse please post it on the Example scripts forum.I hope i got it right My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
shanet Posted December 19, 2010 Author Share Posted December 19, 2010 Yea, I think so. By steal, i meant snatch. [font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS: %programfiles%/AutoIt3/autoit3.chm Link to comment Share on other sites More sharing options...
Zedna Posted December 19, 2010 Share Posted December 19, 2010 About the copyrights/licencing Everything posted on this forum is (by default) free for all purposes if directly not specifying else. So feel free to download/use/modify anything from here if there is not specified some licence/limitation. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 19, 2010 Moderators Share Posted December 19, 2010 shanet,water has it right. I was referring to functions that you have written that you use regularly, or functions from other UDFs that you have modified to work as you prefer. In the first category I have those UDFs in my sig and a number of others I wrote which include functions I use frequently. Why rewrite them every time when a simple #include does the job much more easily?As to the modified functions, an example is my personal version of Array.au3. It has a number of _Array* functions modified to work on 2D arrays where the standard ones do not and a version of _ArrayDisplay which adjusts the column width to fit the contents. I needed the 2D versions for a particular script and decided it was worthwhile keeping them.So in summary I was not suggesting you steal functions (as Zedna has correctly pointed out, most code here is free to use anyway) but that you look at the existing UDFs to get an idea of how you might structure your code when you decide to write #include files containing your own UDFs - which might be original creations or modifications of existing ones. As was pointed out above, if you think you have a good one, please post it in the Examples section so we can all share it. 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...
shanet Posted December 20, 2010 Author Share Posted December 20, 2010 So in summary I was not suggesting you steal functions (as Zedna has correctly pointed out, most code here is free to use anyway) but that you look at the existing UDFs to get an idea of how you might structure your code when you decide to write #include files containing your own UDFs - which might be original creations or modifications of existing ones. As was pointed out above, if you think you have a good one, please post it in the Examples section so we can all share it. M23Yes, I did not mean steal in that way, it just got lost in the text. I meant 'steal' more as in take knowing that they are free.Anyway, thanks guys, I will mark this as solved because I know what I needed now.Many thanks for your help, and Melba for keeping on this thread.shanet [font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS: %programfiles%/AutoIt3/autoit3.chm 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