Sign in to follow this  
Followers 0
Azu

Self updating

4 posts in this topic

How do programs automatically update themselves? I thought files can't be changed while they are running.. but how else would they do it? :whistle:

Share this post


Link to post
Share on other sites



How do programs automatically update themselves? I thought files can't be changed while they are running.. but how else would they do it? :whistle:

You can read information from an generated file to adapt the logic of your script. You can run a generated script ...

The AutoIt script is read at the very begining as a whoole and never reread during the execution. ;)

Share this post


Link to post
Share on other sites

How do I do that?

Share this post


Link to post
Share on other sites

A script can't rewrite itself on the fly, however a compiled script can be written to update. How it would work is this.

Script A sees it needs to update self

Script A opens Script_A.au3 and does text editing and closes source code.

Script A starts Script B

Script A dies

Script B sees Script A die and recompiles the source code replacing finished Script A

Script B restarts Script A and dies


Aha.. I have unlocked it's secrets.. world domination is within my grasp...

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