Jump to content

Self updating


Azu
 Share

Recommended Posts

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

Link to comment
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...

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