RE: edit text entries...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Tom Lavedas (tlavedas_at_hotmail.remove.com)
Date: 08/16/04


Date: Mon, 16 Aug 2004 06:07:01 -0700

Here's one way I can think of ...

sPathSpec = "somefileNmae.ext"
With CreateObject("Scripting.FileSystemObject")
  if .FileExists(sPathSpec) Then
    sUrl = .Getfile(sPathspec).Path
  Else
    wsh.echo "File not found."
    wsh.Quit
  End if
End With
wsh.echo sURL
with CreateObject("InternetExplorer.Application")
  .Navigate("file://" & sURL)
  Do until .ReadyState = 4 : WScript.Sleep 100 : Loop
  s = .document.body.innerText
End With ' IE
wsh.echo s

Tom Lavedas
===========

"ghettocow" wrote:

> I have a batch file that reads a text file and displays certain
> strings back using the 'findstr' command. Some strings that the batch
> returns contain HTML code. The string looks something like this:
>
> Important text1: >
> I was wondering if there is a way to create a vbs file to remove the
> HTML code from the text file. Any help will be appreciated ;)
>
>
> -ghettocow



Relevant Pages

  • Re: How should I deal with this? Automatic translation problem
    ... babelfish), then search through it for the strings I want to replace, and ... "edit" the HTML code, before I actually send it for output and display? ...
    (comp.lang.php)
  • Re: Localizing a .vbs file
    ... > This is my first look at this but we have a .vbs file that has English ... - whether or not the strings are canned, ... For canned strings only and a small number of strings and languages, ...
    (microsoft.public.scripting.vbscript)
  • Re: edit text entries...
    ... >strings back using the 'findstr' command. ... >HTML code from the text file. ... How can a batch job process files that contain command control characters? ...
    (microsoft.public.scripting.vbscript)
  • edit text entries...
    ... I have a batch file that reads a text file and displays certain ... strings back using the 'findstr' command. ... HTML code from the text file. ...
    (microsoft.public.scripting.vbscript)
  • Why do blank lines of HTML appear in Front Page?
    ... When building pages in Front Page, sometimes I discover long strings (several ... thounsands of lines) of blank lines in the HTML code view. ...
    (microsoft.public.frontpage.client)