Jump to content

What can make an #include fail in one script and work in another?


Guy_
 Share

Go to solution Solved by Melba23,

Recommended Posts

www.autoitscript.com/forum/topic/155442-arraymulticolsort-initial-release-16-oct-13

When I try to include Melba's ArrayMultiColSort.au3 in my large program and the current beta, I get this...

J1oIZKn.png

So I thought it must be an incompatibility with the beta.

But if I put just the before mentioned code in a new file, it *does* seem to accept the include in the beta!

Therefore my question...

Edited by Guy_
Link to comment
Share on other sites

  • Moderators

Guy_,

To where have you downloaded the UDF file? The script folder? The main AutoIt "Include folder? Elsewhere? :huh:

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

I'm just discovering that I accidentally saved my working test file also in the UDF folder where I had put your UDF, so I guess your include should be in my (program) script folder...?

Sorry, I had not come across this concept before with UDFs...

Is the clue for a User UDF to be put in your own script folder that you use

#include "ArrayMultiColSort.au3"

instead of

#include <ArrayMultiColSort.au3>

...?

Or do you always put User UDFs in your own script folder?

Edited by Guy_
Link to comment
Share on other sites

  • Moderators
  • Solution

Guy_,

It is not advisable - see the Adding UDFs to AutoIt and SciTE tutorial in the Wiki to understand why - but I cannot see why it should cause a problem. Did the other script also have the #AutoIt3Wrapper_UseX64=n line? :huh:

M23

Edit: Just seen your last post. Obviously your first script is not looking in the correct place. Did you use the installer or the zip file to get AutoIt on your system? :huh:

Edited by Melba23

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

I'm sure I used the installer.

Yes, I copied just the block you see there to a new file.

But that was accidentally saved in the native includes folder, which gave me the clue.

I thought I had seen someone advise to use #AutoIt3Wrapper_UseX64=n

www.autoitscript.com/forum/topic/125338-compile-for-32bit-on-a-64bit-system

so I hope that is correct?

Anyway, I think it's working now.

Thank you for the Tip and UDF! :)

Edited by Guy_
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...