Sign in to follow this  
Followers 0
GodForsakenSoul

#include "..."

6 posts in this topic

taken DIRECTLY from the help file.

The filename of the current script to include. Path is optional. This must be a string--it cannot be a variable.

If "..." is used, the filename is taken to be relative to the current script.

If <...> is used the filename is taken to be relative to include library directory (usually C:\Program Files\AutoIt3\Include). The include library contains many pre-written user-functions for you to use!

notice an important part: RELATIVE TO THE CURRENT SCRIPT(!!!!)

so, i put a #include "Include\GuiConstants.au3" in the beginning because this is where the copy of GUIConstants.au3 sits.

the result is that it refuses COMPLETELY to use it. <> is still fine.

Share this post


Link to post
Share on other sites



taken DIRECTLY from the help file.

notice an important part: RELATIVE TO THE CURRENT SCRIPT(!!!!)

so, i put a #include "Include\GuiConstants.au3" in the beginning because this is where the copy of GUIConstants.au3 sits.

the result is that it refuses COMPLETELY to use it. <> is still fine.

relative to the directory your script is located in?

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Works fine for me.

First try putting a copy of GuiConstants.au3 in the same folder as your script and use #include "GuiConstants.au3" Does that work? (it should)

Then try making a folder called "Include" in the same folder as your script, put GuiConstants.au3 in that folder and try your original #include "Include\GuiConstants.au3". Does that work?

Share this post


Link to post
Share on other sites

there IS a folder called "Include" in the same folder as my script and it doesn't seem to work

while i CAN put it in the same folder as the script, it'll mean i have to change quite alot.

Share this post


Link to post
Share on other sites

there IS a folder called "Include" in the same folder as my script and it doesn't seem to work

while i CAN put it in the same folder as the script, it'll mean i have to change quite alot.

Should work fine when coded correctly.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Just a thought here.

Change that file to GUIConstantsEx.au3

So the path now becomes @ScriptDir & "\include\GuiConstantsEx.au3" so your line should read

#include"include\GUIConstantsEx.au3"

I don't remember if I also used a leading backslash with that or not so it might be

#include"\include\GuiConstantsEx.au3"

EDIT:

I didn't need the leading backslash.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

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

"Old age and treachery will always overcome youth and skill!"

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