Ok the following code is what I have so far and the f.folderitem works but
not the wf (web file) folderitem. How do I make this work, the RL says this
is how to do it but it wont work.
I think the HTTP thing is not right, I have this all in a Method.
Method Name: checkVersion
Parameters: proVersion as String, proVersionDate as String
Return Type: Boolean
Dim http as New HTTPSocket
Dim strin As TextInputStream
Dim f, wf As FolderItem
Dim orgVersion, curVersion, curVersionDate as String
//proVersion = "MD2007-010"
//proVersionDate = "10/10/2006"
// Check the Program Version
f = GetFolderItem("").Child("MedDirectory2007_UPD.txt")
If f <> Nil and f.exists then
strin = f.OpenAsTextFile
orgVersion = strin.ReadLine
proVersion = strin.ReadLine
proVersionDate = strin.ReadLine
strin.Close
else
Msgbox "Could not find the current MedDirectory2007_UPD.txt File in the
MedDirectory Folder, please contact Onlick.Software."
End if
// Check to see if there is an Updated Current Version on the Web
http.get
"http://www.onclicksoftware.com/updates/MedDirectory2007_UPD.txt", wf
If wf <> Nil and wf.exists then
Msgbox "Made it this far" // But NEVER makes it this far!
strin = f.OpenAsTextFile
orgVersion = strin.ReadLine
curVersion = strin.ReadLine
curVersionDate = strin.ReadLine
strin.Close
else
Msgbox "Could not find the Update File on the OCS Server, please contact
Onlick.Software."
End if
// Advise Client of Current Updates
if curVersion = proVersion then
// If there is a NEWER version of the program then return True
Msgbox "The Medication Directory is Current and it is up-to-date!" +
EndOfLine + EndOfLine + " The MedDirectory Database was Last Updated on: " +
proVersionDate
Return False
elseif curVersion <> proVersion then
// If there is a NEWER version of the program then return True
MsgBox "There is a Newer Version of the Medication Directory available.
To continue please click on Continue to begin the process of downloading."
Return True
else
// Error checking
Msgbox "There has been an ERROR in checking for the MedDirectory, please
contact Onclick.Software."
Return False
end if
HELP!!!!!
Jonathon
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.407 / Virus Database: 268.13.1/466 - Release Date: 10/7/2006
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>