Sign in to follow this  
Followers 0
qwerz123

Being able to read included file after compilation

4 posts in this topic

Hello!

After yesterday thread i got 1 more question (or problem). I have a script that i dont want to share source code. But there must be 1 included (lets call "options") file so any people can write their own functions and variables and that file must read by my script. I compile the script but and after i became aware that after compilation my script will use only Options file that was at compiling time. So if after compiling i change variables and functions in Options - my script will not read them. I need a way to start my script in compiled mode and able to read Options.

One way to do this could be reading lines and putting to specific variables but file Options can be any length and consist of any functions and variables. So i don't know any other way to implement this.

Thank for your help and time!

qwerz123

Share this post


Link to post
Share on other sites



qwerz123,

I'm not sure I completely grasp what you're looking for. It looks like you expect your users to write autoit functions and you'd like your code to execute them.

If it's autoit code I'd look at this UDF about running a function in another script and at this:

Good luck!

Share this post


Link to post
Share on other sites

If it's a file that holds some variables for future use, you can use IniWrite() and IniRead(). Hardcode some IniWrite() lines at the beginning of the script to create the initial "options" file for the user

If Not FileExists($iniFile) Then _CreateIniFileFunction()

Another option is to utilize the registry with RegWrite() and RegRead().


Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

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