Oldschool Posted January 30, 2008 Share Posted January 30, 2008 Is there a way to have a compiled script load a non compiled include on startup? Link to comment Share on other sites More sharing options...
martin Posted January 30, 2008 Share Posted January 30, 2008 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 scriptshellexecute(@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 More sharing options...
Oldschool Posted January 31, 2008 Author Share Posted January 31, 2008 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 scriptshellexecute(@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 More sharing options...
BrettF Posted January 31, 2008 Share Posted January 31, 2008 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? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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