Share this post

Link to post

Share on other sites

Melba23 2,574

The #include directive enables you to insert code from other files into your own script. The are lots of include files that are installed with AutoIt - go and look in "C:\Program Files\AutoIt3\Include" - and these hold many of the functions used in scripts.

Just using #include on its own means nothing, which is why SciTE (or AutoIt3Wrapper to be more precise) fails on an error. You need to define a file to be included.

Look in the Help file under include for more help - and the correct syntax to use.

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 columnsChooseFileFolder---- Single and multiple selections from specified path treeview listingDate_Time_Convert-- Easily convert date/time formats, including the language usedExtMsgBox--------- A highly customisable replacement for MsgBoxGUIExtender-------- Extend and retract multiple sections within a GUIGUIFrame---------- Subdivide GUIs into many adjustable framesGUIListViewEx------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx------ Check/clear parent and child checkboxes in a TreeViewMarquee----------- Scrolling tickertape GUIsNoFocusLines------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify------------- Small notifications on the edge of the displayScrollbars----------Automatically sized scrollbars with a single commandStringSize---------- Automatically size controls to fit textToast-------------- Small GUIs which pop out of the notification area

Share this post

Link to post

Share on other sites

WorknMan 0

I'm writing a script that will have several include files. I want to put these in a subdirectory of the main script directory called 'include', and then include them like so:

#include @scriptdir & "\include\file_name.au3"

This way, if I ever move the script around, I don't have to go back in and manually change the path. However, I am getting the 'cannot parse include' message. Is it not possible to use @Scriptdir (or even variables) with #include?

Visit myBlog.. currently not active but it will soon be resplendent with news and views. Alsoplease remove any links you may have to my website. it is soon to be closed and replaced with something else.

Visit myBlog.. currently not active but it will soon be resplendent with news and views. Alsoplease remove any links you may have to my website. it is soon to be closed and replaced with something else.