Web Delivery
Chipp Walters
chipp at chipp.com
Thu Jul 22 20:06:32 EDT 2004
Whoops, a typo and forgot an 'end if'
Try this:
on startStack pStackFile
put "C:/myfolder/" into tFolderPath
put pFolderPath & pStackFile into tFilePath
if there is a file tFilePath then
--> STACK EXISTS SO OPEN IT
open stack tFilePath
else
--> NO STACK FOUND SO DOWNLOAD IT FROM THE INTERNET
put "http://www.mydomain.com/" into tURLfolder
put tURLfolder & pStackFile into tURLfile
--> DOWNLOAD THE FILE
put URL tURLfile into URL ("binfile:" & tFilePath)
--> CHECK TO SEE IF THERE WERE ANY ERRORS
put the result into tResult
if tResult is not empty then
answer warning tResult
end if
--> MAKE SURE THE STACK EXISTS BEFORE OPENING
if there is a stack tFilePath then
open stack tFilePath
else
--> PROBLEM
answer warning "Can't find file: " & tFilePath
end if
end if
end startStack
More information about the use-livecode
mailing list