Jump to content

Recommended Posts

Posted (edited)

Hi all.

I have created an external au3 (a library of functions and vars) that is #included in a main script that i must compile.

I wish that the content of the library is not merged with the main script when compiling.

My goal is to keep the ability to modify the library even after the main exe is compiled and that these changes are effective when executing the exe.

I guess this is not possible using the standard #include method.

Is there a way to do that ?

thx a lot :-)

Edited by pedrit0

Pedrit0, calme et tranquille, la tete dans les nuages et la b*** dans le champagne.

Posted

Hi Jfish

I have 2 files:

- mainscript.au3

- FunctionLibrary.au3 that contains the functions to be used by mainscript

I want to compile mainscript.au3 but not FunctionLibrary.au3 because i want to be able to modify it later without having to recompile the mainscript.

I know this behavior is not possible with the #include method that would merge the library to the mainscript during compilation. Which means that the external library would become useless.

So I am looking for another method.

Pedrit0, calme et tranquille, la tete dans les nuages et la b*** dans le champagne.

Posted (edited)
29 minutes ago, pedrit0 said:

because i want to be able to modify it later without having to recompile the mainscript

My only goal. For an IT project. The exe would run 'in production' on a server and its function library can be edited/updated without having to modify the main exe.

Can you develop about ' shellexecute au3 source files' ? Sounds interesting but when I google it it seems not to fit exactly to what I need.

Edited by pedrit0

Pedrit0, calme et tranquille, la tete dans les nuages et la b*** dans le champagne.

Posted

To be more specific, this library strictly contains var statements and functions. No processing.

Pedrit0, calme et tranquille, la tete dans les nuages et la b*** dans le champagne.

Posted

External functions that do not stick to the script own structure. These functions can be altered/modified without threatening the main script process.

The vars are global vars that could be used by several scripts later.

Pedrit0, calme et tranquille, la tete dans les nuages et la b*** dans le champagne.

Posted

What I mean is that I cannot pass trough using ini or xml files as a workaround. The goal is really to store some functions in the library.

Pedrit0, calme et tranquille, la tete dans les nuages et la b*** dans le champagne.

Posted

Oh I get your misunderstanding... sorry. I have made up this system:

- I have an ini file listing some steps of processings. Step# = FunctionName()

- I have the main script parsing the ini file and executing the iniread as a function call in a loop, whatever the function is and whatever its name. So no need to know the function for the main script.

- the function to be executed is stored in the functionlibrary.au3

- several persons need to update / add functions in the library without recompiling anything.

Pedrit0, calme et tranquille, la tete dans les nuages et la b*** dans le champagne.

Posted

sounds like executing raw au3 files against the au3 exe from your main script as fed by the ini would work ... 

I created a program called "scriptrunner" that did basically that.  You could record scripts, edit them, and sequence them to be run from the main application.  There may be other ways that are better but I will defer to others for those ... 

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Posted

yep but my issue remains : how to keep the library out ???

Pedrit0, calme et tranquille, la tete dans les nuages et la b*** dans le champagne.

Posted

:-) that would be heaven if I could. These functions are to be called from the main exe.

Pedrit0, calme et tranquille, la tete dans les nuages et la b*** dans le champagne.

Posted (edited)

I have just tried but the global vars declared in the library are not detected by the main script... but i think this a good clue and I try out all I can with that tomorrow. Tired. Going to bed. thx a lot for the time you have spent on the topic :-)

Edited by pedrit0

Pedrit0, calme et tranquille, la tete dans les nuages et la b*** dans le champagne.

Posted (edited)

to be noted : when using that you must disable Au3Check before compilation... it won't like unexplicitely declared vars.

Edited by pedrit0

Pedrit0, calme et tranquille, la tete dans les nuages et la b*** dans le champagne.

  • 6 years later...
Posted (edited)

@pedrit0 have you get this to work?

i'm looking for similar things for days now. i would like someting like MSScriptContol where you can reload updated script/function and then call it in your main exe.

Edited by alankam58
  • Developers
Posted (edited)

What is the reason you need to change the script code and that can't be done with an ini file?

Ps that member hasn't been around the last 6 years!

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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