Sign in to follow this  
Followers 0
GodForsakenSoul

including stuff

5 posts in this topic

#1 ·  Posted (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 by GodForsakenSoul

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by R6V2

Share this post


Link to post
Share on other sites

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... :);:lmao:

file2

#include "file3.au3"

end file2

file1

call something you can call on demand

One #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.

:party:


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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by R6V2

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