Jump to content

Have i done Right? Adding UDF .. i think


Recommended Posts

So i was in need of this custom udf Fastfind

Melba23

showed me this great article on AutoIt wiki..http://www.autoitscript.com/wiki/Adding_UDFs_to_AutoIt_and_SciTE

and i think i did like it said.. mostly anyway..

I downloaded and unzipped FastFind and placed all files in a new Folder i created in the AutoIt3 Folder

The files i placed in the new Folder: <-- Named it FastFind

Benchmark.au3

FastFind.au3

FastFind.dll

FastFind_Demo.au3

FastFind.dll

I think the Benchmark and FastFind_Demo are just examples.. But i don't think they will Hurt by being in there ? They don't have any Dll to them.. and Even though i am not shure about it.. i think you need the dll to include and call the Custom Files from that folder.

Correct me if i am wrong :)

So after placing the files in the new Folder, i started SciTE --> SciTE Config --> User Include Dir: C:Program Files (x86)AutoIt3FastFind Save+Apply

So can i now #include <fastfind.au3> ? and you the build in functions?

I have not tried this yet because i dont know how to use the custom UDF "syntax?"

Edited by Schoening
Link to comment
Share on other sites

Hi Schoening,

You have got it almost right.

The FastFind.dll is just for the FastFind UDF, most includes/UDF's do not require a DLL.

About the User Include Dir, it does not have to be in the AutoIt directory.

That option in SciTE is there to allow you to keep your includes in a separate directory, or multiple directories, which allows you to manage them more efficient and keeps them save when updating AutoIt.

To include the UDF you should indeed just put the line at the top of your script and use the functions like you normally do.

#include <fastfind.au3>

As an aside, put #include-once at the top of the UDF (FastFind.au3), this ensures the file is only included once even if you explicitly include it more then once.

I am not familiar with the FastFind UDF so I can not help you with that.

I hoop this helps.

Edited by Robjong
Link to comment
Share on other sites

Hi Schoening,

You have got it almost right.

The FastFind.dll is just for the FastFind UDF, most includes/UDF's do not require a DLL.

About the User Include Dir, it does not have to be in the AutoIt directory.

That option in SciTE is there to allow you to keep your includes in a separate directory, or multiple directories, which allows you to manage them more efficient and keeps them save when updating AutoIt.

To include the UDF you should indeed just put the line at the top of your script and use the functions like you normally do.

#include <fastfind.au3>

As an aside, put #include-once at the top of the UDF (FastFind.au3), this ensures the file is only included once even if you explicitly include it more then once.

I am not familiar with the FastFind UDF so I can not help you with that.

I hoop this helps.

Certainly does :) thank you !

Should i also only #include-once if i keep using the Functions of FastFind in a infinite loop?

Edited by Schoening
Link to comment
Share on other sites

  • Moderators

Schoening,

No, #include-once is a directive that is put into #include files to prevent multiple loads. Many UDFS use the more common #include files (such as WinAPI.au3, Array.au3, etc) and this directive prevent multiple loads if the script tries to load the file more than once. You do not need it in your script at all. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

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

×
×
  • Create New...