New Zealand
Asked — Edited

$Update_Available

@DjSures here is an idea for a future update that should'nt take too much to implement...

What about expanding on the CHECK FOR UPDATE function so an auto check facility can be included in the preferences section.

OR even better could there be an automatic check at startup with the result stored in a variable something like $EZ-Builder_Update_available

Then we could have our bots and A.I.'s say something like...

"Master DJ. a software update is available. Would you like me to start the installation?" (Y/N)...

Here's a strip down of my current method... I verbally tell my A.I that an update is available. The voice command script then changes the variable $EZB_Software_Update="No" to obviously "Yes"... then next time my A.I. cycles through its checks it rund the following code...


#   /-------------------------------\
#     a software update downloader
#   \-------------------------------/
IF ($EZB_Software_Update="Yes" )
  Say ("A software update is available." )
  goto (Download_Update)
Elseif
  halt()
ENDIF 
  
: Download_Update
Say = ("Please save the file to my drop box software updates folder." )
Browser ("https://synthiam.com/EZ-Builder/files/EZ-Builder%20Installer.msi" )

: Download
sleep(15000)
Say = ("Has the download completed successfully?" )
    #  A Confirmation script runs here that asks to user to say
    #  Yes, Affirmative, No, Negative or Not Yet!  
    # The answer is returned in the $Response variable
    #  ControlCommand( "Script Manager", ScriptStartwait, "Confirmation" )
IF ($Response="Yes" ) or ($Response="Affirmative" )
   Goto (Impliment_update)
ELSEIF ($Response="Not yet" )
    # No so wait a bit longer...
    goto (Download_wait)
ElseIF ($Response="No" ) or ($Response="Negative" )
  # Do you want to cancel?
  Say =("Terminating update process" )
  Halt()
ENDIF 


: Impliment_update
Exec ($Folder_Dropbox + "\My Robotics\EZ_Builder software\EZ-Builder Installer.msi" )
Sleep(1000)
Exec ($Folder_Dropbox + "\My Robotics\Batch Files\kill ARC.vbs" )



ARC Pro

Upgrade to ARC Pro

With Synthiam ARC Pro, you're not just programming a robot; you're shaping the future of automation, one innovative idea at a time.

#1  

I second that motion tameion! :)

PRO
Synthiam
#3  

Okie:) I'll see what I can do

United Kingdom
#5  

There is a work around, although I don't have the details here but you could use HTTPGet() to fetch the latest version information from the same url ARC uses, have a variable set with your current version (you'd likely have to manually set this), compare them and if they don't match then there is an update available.

Something simple like;

$current_version = "2014.03.14.00"
$latest_version = HTTPGet("https://synthiam.com/whatevertheurlis")

IF($current_version != $latest_version)
  $EZB_Software_Update = "yes"
Else
  $EZB_Software_Update = "no"
ENDIF

But, if DJ can add it in without that much hassle then the above is pretty much pointless :)

The same workaround could be used for other software used too which has the ability to check for updates if your robot runs other third party software too.

PRO
New Zealand
#6  

Giving it a go right now Rich... Will let you know!

thanks

  • Wayne (@Tameion)

[EDIT]

Forgot to attach my brain.... the reason I had to use the above method was because I did not know the URL for the update information...

Unless you know, or DJ tells, then we'll have to wait for him to work his magic.

;)

United Kingdom
#7  

I have the url at home (I sniffed it with Fiddler) but not here. I'll see if I can find it later unless DJ tells us or works his magic in the mean time.

United Kingdom
#8  

http://synthiam.com/Products/ARC

Netherlands
#9  

That's cool:D I didn't know that URL existed. The code works great!

Here's the adaptation of @Rich's code (I just put in the right URL):


$current_version = "2014.03.08.00"
$latest_version = HTTPGet("http://synthiam.com/Products/ARC")

IF($current_version != $latest_version)
  $EZB_Software_Update = "yes"
Else
  $EZB_Software_Update = "no"
ENDIF

United Kingdom
#10  

I stumbled upon the url a while back when I had problems with something else that I needed to sniff the traffic, opened ARC and up that pops :)

Use that code, along with @tameions code and it should be perfect. You could even add in a line to write current version to a txt file after update so the script can grab that for the checks.

United Kingdom
#11  

I had a few minutes spare so had a quick play with this. Typical of me, I'll find a work around for something that will most likely be added natively anyway but it keeps me sharp :)


# Automated version checking script
# Checks for the latest version of ARC
# If current version does not match the latest
# release the user is notified.

# Configuration
# Update to latest known update version before running each time.
# Once updated $Current_Version is updated automatically.
$Current_Version = "0000.00.00.00"
$Latest_Version = "unknown"

:compare
# Script will fail if URL of version.txt doesn't exist or is
# down. Avoid failure of checking by running the command to
# check this in it's own script. Project MUST have script
# "Get Latest Version Info".
ControlCommand("Get Latest Version Info", ScriptStartWait)

# Version Comparison
IF($Current_Version != $Latest_Version)
  $Update_Available = "Yes"

  # Insert additional code here for retrevial and installation of update

  # Update current version info to the latest installed version
  $Current_Version = $Latest_Version

Else
  $Update_Available = "No"

  # Insert additional code here for when update is not available

ENDIF

# Wait 1 hour before checking again (adjust to suit)

# Avoid errors on the hour variable when hour is 11pm
IF($hour = 23)
  $Check_Hour = 0
Else
  $Check_Hour = $hour+1
EndIf

WaitUntilTime($Check_Hour, $minute)

# Loop back to the start
Goto(compare)

You will also need the script which checks the URL as noted in the comment. Name this "Get Latest Version Info"


$Latest_Version = HTTPGet("http://synthiam.com/Products/ARC")

See the notes/comments. This code will check for updates hourly.

I'll leave the whole automatic download and install part to you as this will require third party software to run which will automatically install the update.

#12  

Excellent work @Rich! Well organized, efficient, and useful! ....As usual! Thanks so much :)

United Kingdom
#13  

It doesn't end there...

I had a little more time so did more playing around this time with AutoHotKey for a silent (or passive to be technically correct) install.

First, you need to compile an AHK script (it's crude and simple but it works and is better than a batch file).

Process, Close, ARC.exe
Run, %windir%/System32\msiexec.exe /i C:\ARC.msi /passive
Sleep, 60000
Run, C:\Program Files (x86)\EZ-Robot Inc\ARC.ARC.exe

If you need to, change the sleep. 60 seconds (60,000 ms) was enough on my PCs but you may need longer. There may be a better way by monitoring processes and waiting for processes to finish but I don't know enough about AHK to know the commands for that.

You may also need to change the paths for the ARC installer (line 2, change "C:\ARC.msi" to the correct path) and for the ARC executable file when installed (if you don't run 64 bit windows it will be "C:\Program Files" not "C:\Program Files (x86)" on line 4)

Although as I type this I notice a possible issue, and that is the above will load a vanilla ARC rather than the project, so change line 4 to load a shortcut (I'm sure you can figure out how).

You will need the AHK compiler, get it from http://www.autohotkey.com/, it's free and it's simple to use, just follow the on screen instructions. If memory serves me correctly you will need to put the file extensions on for the destination, otherwise it doesn't and the compiled version has no extension.

You can use any text editor to create the AHK script. Notepad, Notepad++, whatever you prefer.

Also, it's late here and I'm tired so please excuse the above not being to my normal standards. I'll make it clearer when I get more time and am not falling asleep at the PC.