GodForsakenSoul Posted April 1, 2008 Share Posted April 1, 2008 (edited) i have a couple of questions about including. 1) is it possible to use the file i included in another file in the main program? ex: file3 *something you can call on demand* (i forgot how it's called... ;:) file2 #include "file3.au3" end file2 file1 call something you can call on demand 1.5) can the same be done with GUIs? 2) is it possible to make a full file of dim $1=whatever and use them in the main program? 3) the files i want to include are going to be in a folder near the main program. as far as i understand from the help file, i can use #include "@SomethingDir/folder" to include stuff that are around the main program. anyone mind confirming my theory? also, what is the Something in SomethingDir? XD;; Edited April 1, 2008 by GodForsakenSoul Link to comment Share on other sites More sharing options...
Swift Posted April 1, 2008 Share Posted April 1, 2008 (edited) 1) You can, but when decompiled/ran, it will look like this: ;Main app.au3 Exit ;Main program #Include "MainApp.au3" SplashPicOn();or whatever, just a demo Exit When compiled it's going to look like this: Exit SplashPicOn(); or whatever....just a demo Exit 2) I don't know 3) when including, you cant use macros, and cannot have them in quotes, use something like this: (This script is at your desktop) #Include "\..\file.au3" That would read: @DesktopDir - 1Dir & File.au3 so for me. C:\Documents and settings\user\desktop\ and that would be: C:\documents and settings\user\file.au3 Did, I answer your questions (2 that I knew)? Edited April 1, 2008 by R6V2 Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 1, 2008 Share Posted April 1, 2008 i have a couple of questions about including. 1) is it possible to use the file i included in another file in the main program? ex: file3 *something you can call on demand* (i forgot how it's called... ; file2 #include "file3.au3" end file2 file1 call something you can call on demandOne #include file can contain #include statements that will also include those files (if that's what you meant). 1.5) can the same be done with GUIs? Huh? 2) is it possible to make a full file of dim $1=whatever and use them in the main program?Yes, and if you open a file like GuiConstants.au3, you'll see that's mostly what's in there. 3) the files i want to include are going to be in a folder near the main program. as far as i understand from the help file, i can use #include "@SomethingDir/folder" to include stuff that are around the main program. anyone mind confirming my theory? also, what is the Something in SomethingDir? XD;; You cannot use variables or macros in the file name, it must be a literal string. You can provide the full path, or just the file name. If you put just the file name (which is most common) in double quotes (vice angle brackets) then the executing script directory will be checked first for the file. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 1, 2008 Share Posted April 1, 2008 3) when including, you can use macros, but cannot have them in quotes...No, you can't. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Swift Posted April 1, 2008 Share Posted April 1, 2008 (edited) No, you can't. Yeah, sorry just fixed that, I was checking in the helpfile to see if you can't or cannot. Edited April 1, 2008 by R6V2 Link to comment Share on other sites More sharing options...
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