Sign in to follow this  
Followers 0
theguy0000

can't find include file?

5 posts in this topic

#1 ·  Posted (edited)

Include("C:\includetestfile.au3")
Func Include($s_path)
    Const $workingDir = @WorkingDir
    FileChangeDir(@ScriptDir)
    FileCopy($s_path, "includefile0.au3")
    #include "includefile0.au3"
    FileDelete("includefile0.au3")
    FileChangeDir($workingDir)
EndFunc

before anyone mentions it, yes C:\includetestfile.au3 does exist lol

edit: it says it can open the file, but in the title it said it cant find it.

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites



Include directives are processed before user code is executed so whatever you are trying to do is never going to work.

Share this post


Link to post
Share on other sites

Include("C:\includetestfile.au3")
Func Include($s_path)
    Const $workingDir = @WorkingDir
    FileChangeDir(@ScriptDir)
    FileCopy($s_path, "includefile0.au3")
    #include "includefile0.au3"
    FileDelete("includefile0.au3")
    FileChangeDir($workingDir)
EndFunc

before anyone mentions it, yes C:\includetestfile.au3 does exist lol

edit: it says it can open the file, but in the title it said it cant find it.

C:\includetestfile.au3 exists, but includefile0.au3 does not.

"#include" is a preprocessor directive, meaning it is evaluated at compile time.


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

oh well that sux...


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

oh well that sux...

Try doing that in any other language...

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

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