Mangled URL File Download
Posted: Thu Feb 09, 2012 11:28 pm
I am attempting to create an application that will down load a Google Earth KMZ file and load it into the Google Earth application. The target KMZ file is stored on a server connected to the internet.
I have put the target file's URL into a field named fldMyURL. If I use the line the URL is passed to my default browser, Safari, and the file downloads to my downloads folder. Double clicking on the file causes it to open in Google Earth and display the points of interest. However, if I use the line then a file is written to the default folder but it is slightly different and does not load correctly into Google Earth.
Examining the two file in a hex editor shows that they are different lengths and that the corrupted file has a type creator set as TXET/txtt whereas the working file has no type data.
I have also tried the command libURLDownloadToFile but I could not get it to work i.e nothing was downloaded.
Any ideas as to what is going wrong?
best wishes
Simon
I have put the target file's URL into a field named fldMyURL. If I use the line
Code: Select all
launch url fld"fldMyURL"
Code: Select all
put url fld"fldMyURL" into URL"file:lkp.kmz"
Examining the two file in a hex editor shows that they are different lengths and that the corrupted file has a type creator set as TXET/txtt whereas the working file has no type data.
I have also tried the command libURLDownloadToFile but I could not get it to work i.e nothing was downloaded.
Any ideas as to what is going wrong?
best wishes
Simon