Jump to content

Can a compiled script load an non compiled include?


Recommended Posts

Is there a way to have a compiled script load a non compiled include on startup?

If the include is not needed to compile the script, why do you want to load it? What do you mean by load?

If you mean "Can a compiled script run a non compiled script?" then yes it can. Look up "running scripts" in the help. It will tell you how to do it.

If you have something like this in your script

shellexecute(@AutoItExe,"/AutoIt3ExecuteScript MyScript.au3")

then it will run BUT you will probably find that it won't be able to find any include files in the script unless they are in they are all given the full paths, or enclosed in quotes instead of angled brackets if they are in the script folder. This could be quite a problem since includes can include other includes. ASAIK this is true even on the machine where AutoIt is installed.

If you are running the compiled AutoIt exe on a machine which has AutoIt installed then use "Form 1" in the help file.

shellexecute("AutoIt3.exe ","/AutoIt3ExecuteScript myScript.au3")

then there won't be a problem finding the #incude files.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

If the include is not needed to compile the script, why do you want to load it? What do you mean by load?

If you mean "Can a compiled script run a non compiled script?" then yes it can. Look up "running scripts" in the help. It will tell you how to do it.

If you have something like this in your script

shellexecute(@AutoItExe,"/AutoIt3ExecuteScript MyScript.au3")

then it will run BUT you will probably find that it won't be able to find any include files in the script unless they are in they are all given the full paths, or enclosed in quotes instead of angled brackets if they are in the script folder. This could be quite a problem since includes can include other includes. ASAIK this is true even on the machine where AutoIt is installed.

If you are running the compiled AutoIt exe on a machine which has AutoIt installed then use "Form 1" in the help file.

shellexecute("AutoIt3.exe ","/AutoIt3ExecuteScript myScript.au3")

then there won't be a problem finding the #incude files.

That's not what i had in mind...

I need a way to have a configurable part of a script, that end users can edit/configure themselves, but I don't want to release the source of the main program.

I guess .ini file is an option, just not a very flexible one.

Link to comment
Share on other sites

That's not what i had in mind...

I need a way to have a configurable part of a script, that end users can edit/configure themselves, but I don't want to release the source of the main program.

I guess .ini file is an option, just not a very flexible one.

Maybe use the registry?
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...