Sign in to follow this  
Followers 0
firewalldevil

Cannot parse #include

6 posts in this topic

Hello,

i am stop at the Basic from create a gui....

the message:

Cannot parse #include

here are the code:

#include

GUICreate("Hallo Welt", 200, 100)

GUISetState(@SW_SHOW)

Sleep(20000)

i am working with the version:

SciTE

Version 1.77

Oct 23 2008 19:06:08

why stop the code?

thanks

Share this post


Link to post
Share on other sites



firewalldevil,

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

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?

Share this post


Link to post
Share on other sites

#include "\include\file_name.au3"


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

#include "\include\file_name.au3"

Actually, it's:

#include "include\file_name.au3"

But close enough, thanks ;)

Share this post


Link to post
Share on other sites

Right you are. My mistake and I should have spotted it.


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