I've got the following batch file:
When I run it like this:
I get this:
However, when I run it like this:
I get this:
In other words, nothing at all.
And when I comment out the "SetDOS /X-45678" and use "Echo %@SafeExp[%Content]", TCC crashes (32-bit TCC on a 64-bit machine).
What is happening here and how do I fix it?
Oh, as an aside, using a URL works fine for a copy command, for instance, but not at all anywhere in the batch-file language (%@FileSize, %@FileOpen, etc.) This is just the way things are?
- Dan
Code:
@Echo Off
SetLocal
Set FileName="The Name of A File Containing a WebPage.html"
Set FileSize=%@FileSize[%FileName]
Set FH=%@FileOpen[%FileName,r,t]
Iff %FH == -1 Then
@EchoErr Unable to open webpage %FileName
Quit 8
EndIff
SetDOS /X-45678
Set Content=%@FileRead[%FH,%FileSize]
SetDOS /X+45678
@Echo >NUL: %@FileClose[%FH]
SetDOS /X-45678
@Echo *****************************************************************
@Echo %Content
@Echo *****************************************************************
EndLocal
Quit 0
Code:
ReadHTML
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/">
<head>
<title>Iron & Wine Related Musicians </title>
... Lots of html ...
<div style='display: inline-block; vertical-align: middle; height: 20px; width: 90px; padding: 0px; margin-left: 10px;'><g:plusone size="medium" href="http://www.starpulse.com/"></g:plusone></div>
<div id='footer_bar_close' title='close' onclick='document.getElementById("footer_bar").style.display="none"; document.cookie="footer_bar_disabled=true;domain=.starpulse.com";'>x</div>
</div>
</div>
</body>
</html>
Code:
ReadHTML |& List
Code:
And when I comment out the "SetDOS /X-45678" and use "Echo %@SafeExp[%Content]", TCC crashes (32-bit TCC on a 64-bit machine).
What is happening here and how do I fix it?
Oh, as an aside, using a URL works fine for a copy command, for instance, but not at all anywhere in the batch-file language (%@FileSize, %@FileOpen, etc.) This is just the way things are?
- Dan