Jump to content

Recommended Posts

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

Posted

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

Posted

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]

Posted

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

Posted

oh well that sux...

Try doing that in any other language...

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

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
×
×
  • Create New...