firewalldevil Posted October 17, 2009 Posted October 17, 2009 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
Moderators Melba23 Posted October 17, 2009 Moderators Posted October 17, 2009 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 Open spoiler to see 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
WorknMan Posted October 2, 2010 Posted October 2, 2010 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?
GEOSoft Posted October 2, 2010 Posted October 2, 2010 #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!"
WorknMan Posted October 2, 2010 Posted October 2, 2010 #include "\include\file_name.au3"Actually, it's: #include "include\file_name.au3"But close enough, thanks
GEOSoft Posted October 3, 2010 Posted October 3, 2010 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!"
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now