Jump to content

Udf Question


Dx3
 Share

Recommended Posts

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)
Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...