whats a script to make it so that i can update an Application?
Can you give us more information? Update a specific application, or any app? Update it how and with what? Post back with some specifics of what you’re trying/wanting to do and perhaps we can assist. There just isn’t enough info in your post for us to help you.
Just when i make an Update then when the people goes online then it shows this window that says Theres A new update.
You need to be able to put a file (or something) online that your application can check. Can you do that?
yes thats what i plan on doing. So after it’s on the internet then whats next?
you could use ‘curl’ with do shell script to load your version number from your web:
As an example: if your Version number was the second word in one of macscripter’s javascripts you would write:
set theVersion to word 2 of (do shell script "curl [url=http://macscripter.net/js/dom.js)]http://macscripter.net/js/dom.js")[/url]
→ theVersion = “isNS4”
sry for the stupid example
Note: Please keep in mind that many people don’t like apps going online without having asked before. So you probably better implement a ‘no, I don’t want this app checking for updates’-option.
O so when i have an update i will put it on the website and then it will just update?
Checking a version string from your web site as mentioned above is a first step …
then - if there is a new version found - you might ask your user sth. like ‘There is a new version of XYZ available - do you want to download …?’ and then your app could start downloading (you can also do this using the shell command ‘curl’ - or ‘ftp’ - check the manual pages for details: ‘man …’)
Depending on how much automatism you want to implement, you can then
- simply let your application tell the user what to do after finishing the download -
- or you could let your app wait until the download is done, expand the downloaded archive if necessary, start an installer etc …
You’d have to know where to find the file; Either it always uses the same URL, and you include that in your script, or the file that is checked could contain a URL for the new file.
Probally i would want the first 1
- simply let your application tell the user what to do after finishing the download -