Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: ExecCommand Saveas dialog @False
cSave = "E:\WBDEMO\OETEMP.HTM" cURL = "http://www.winbatch.com" cFile = "E:\WBDEMO\STRIP.TXT" If FileExist(cSave) FileDelete(cSave) Endif AddExtender("wwwsk34i.dll") oE = ObjectAccess("InternetExplorer.Application",@TRUE) oE.Visible = @True oE.Navigate(cURL) While oE.readystate<>4 TimeDelay(1) EndWhile oDoc = oE.Document oDoc.ExecCommand("SaveAs",@FALSE,cSave) ObjectCLose(oDoc) ObjectCLose(oE) fs = FileSize(cSave) bb = BinaryAlloc(fs) BinaryRead(bb,cSave) cStrip = BinaryPeekStr(bb,0,fs) BinaryFree(bb) cStrip=httpStripHTML(cStrip) handle = FileOpen(cFile,"WRITE") FileWrite(handle,cStrip) FileClose(handle) exit
A Moving and a Shaking
----------------------
Read the section 'Save the Last GIF for Me '
http://msdn.microsoft.com/en-us/library/bb250487(VS.85).aspx#webteam03052001_topic2
In short, its caused by a security catch 22.
You might take a look into using the Wininet extender functions to handle the webpage retrieval...
Here is an example:
cSave = "c:\temp\OETEMP.HTM" cURL = "http://www.winbatch.com" cFile = "c:\temp\STRIP.TXT" If FileExist(cSave) FileDelete(cSave) Endif AddExtender("wwwsk34i.dll") AddExtender("WWINT34i.DLL") tophandle=iBegin(0,"","") datahandle=iUrlOpen(tophandle,cURL) xx=iReadData(datahandle,cSave) iClose(datahandle) iClose(tophandle) fs = FileSize(cSave) bb = BinaryAlloc(fs) BinaryRead(bb,cSave) cStrip = BinaryPeekStr(bb,0,fs) BinaryFree(bb) cStrip=httpStripHTML(cStrip) handle = FileOpen(cFile,"WRITE") FileWrite(handle,cStrip) FileClose(handle) exit
Article ID: W14934
File Created: 2010:09:01:08:57:10
Last Updated: 2010:09:01:08:57:10