Sign in to follow this  
Followers 0
Guy_

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

6 posts in this topic

#1 ·  Posted (edited)

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_

Share this post


Link to post
Share on other sites



Guy_,

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

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 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

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I put it where all the native UDFs are...

c:Program Files (x86)AutoIt3Include

So I hope that is wrong? :)

Edited by Guy_

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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_

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

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 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

 

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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_

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  
Followers 0

  • Similar Content

    • TrashBoat
      By TrashBoat
      How do i add a path to a file in Include.
      I want my script to get the udf in the same folder as the script/exe:
      Include "@ScriptDir/udf.au3" can this be done?
    • ur
      By ur
      I have recorded a gui installation and modified the au3 file as per my requirement.
      But the problem is, whenever I try to compile the au3 file, I am getting a special character on top of the file.

      Can you suggest how to resolve this as it is appearing everytime during compilation.
      And also I am trying to include a au3 file which is separate folder so I am adding the <..\Library.au3> line.
      It is able to pick that but in that file "Library.au3" there is a file install line.
      FileInstall(".\SendMail.ps1", @ScriptDir & "\SendMail.ps1") Library.au3 is being used by many other codes in the previous folder..
      But the current file is looking for the ps1 file in current folder.
      So is there any option to tell the compiler to pick the dependent files relative to Library.au3 instead of the current code.
    • pedrit0
      By pedrit0
      Hi all.
      I have created an external au3 (a library of functions and vars) that is #included in a main script that i must compile.
      I wish that the content of the library is not merged with the main script when compiling.
      My goal is to keep the ability to modify the library even after the main exe is compiled and that these changes are effective when executing the exe.
      I guess this is not possible using the standard #include method.
      Is there a way to do that ?
      thx a lot :-)
    • xiantez
      By xiantez
      Hey AutoIT Community,
      Just wanted to know if there is a way I can #include all *.au3 files in my script without having to #include each individual .au3 file. For instance, currently I have a laundry list of #includes like this:
      #include <IE.au3>
      #include <Inet.au3>
      #include <AutoItConstants.au3>
      #include <GUIConstantsEx.au3>
      #include <GDIPlus.au3>
      #include <GuiMenu.au3> 
      [ECT...ECT...]
      Would there be a way I could include all of the files above or all  .au3 file in a one liner? That way I do not have to burn up a bunch of lines of code for just my includes.... Your help is greatly appreciated...
    • Miliardsto
      By Miliardsto
      Is there possibility to do it like this?
      Cause as I see compiler doesn't see If statement in case of #include functions.
      It includes these two files all time.
      If $var == True Then #include 'func/funcsByTabs/main_Moda.au3' Else #include 'func/funcsByTabs/main_Others.au3' EndIf