Author Topic: A script that updates itself?  (Read 871 times)

0 Members and 1 Guest are viewing this topic.

Offline utkesmer

  • Major(1)
  • Posts: 44
A script that updates itself?
« on: June 07, 2012, 04:42:11 pm »
Can we make a script that has the ability to update itself?

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: A script that updates itself?
« Reply #1 on: June 08, 2012, 06:43:45 am »
Actually, yes. You can make a script that rewrites it's own source basing on some data (GetURL()?) and then saves the result as it's own source (as long as you know the file name). Then you can simply recompile and the new version will load.
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline CurryWurst

  • Camper
  • ***
  • Posts: 265
    • Soldat Global Account System
Re: A script that updates itself?
« Reply #2 on: June 08, 2012, 10:06:12 am »
This is definitely possible. DorkeyDear aka Curt made a script in the past called "Curts Script Update Service" (CSUS) using GetURL as FalconPL suggested above.
Soldat Global Account System: #soldat.sgas @ quakenet