Sign in to follow this  
Followers 0
shanet

>SOLVED< UDF tutorials?

11 posts in this topic

#1 ·  Posted (edited)

Hey guys,

just wondering if there are any leadins/walkthroughs on UDF creation?

Thanks,

shanet

Edited 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

Share this post


Link to post
Share on other sites



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. :x

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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. :x

M23

Thanks Melba23

I shall read that :P

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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. :x

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. :P

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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. :x

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

Share this post


Link to post
Share on other sites

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

What Melba means (at least I understand it this way :x):

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 :P


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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. :x

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. :P

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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. :x

M23

Yes, 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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0