Jump to content

Recommended Posts

Posted

Hello everyone, I'm new here (first post :think: ). I have a question, what are UDF's? How do I use them, do I need to add something extra to use them? Thanks, bye.

Posted

User defined functions.

You can #include a file containing UDF's at the begining of the script.

#include 'Someones_udfs.au3'

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Posted

From the helpfile

User Functions

User functions are declared using the Func...EndFunc statements.

Functions can accept parameters and return values as required.

Function names must start with either a letter or an underscore, and the remainder of the name can contain any combination of letters and numbers and underscores. Some valid function names are:

MyFunc

Func1

_My_Func1

Here is an example of using a function to double a number 5 times:

$val = 10

For $i = 1 To 10

$doubled = MyDouble($val)

MsgBox(0, "", $val & " doubled is " & $doubled)

$val = $doubled

Next

Exit

Func MyDouble($value)

$value = $value * 2

Return $value

EndFunc

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
×
×
  • Create New...