Jump to content
Sign in to follow this  
Dx3

Udf Question

Recommended Posts

Dx3

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.

Share this post


Link to post
Share on other sites
Simucal

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)

Share this post


Link to post
Share on other sites
MHz

_UDF('Welcome Dx3')

Func _UDF($text)
    MsgBox(0, '', $text)
EndFunc

:think:

Share this post


Link to post
Share on other sites
Paulie

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.