Jump to content
Sign in to follow this  
Vladi243

Delete text

Recommended Posts

Vladi243

Is AU3 has a function that delete text like the tag <del> in HTML?

Share this post


Link to post
Share on other sites
SmOke_N

Is AU3 has a function that delete text like the tag <del> in HTML?

You'll need to write something to suit your needs... StringReplace() / StringRegExpReplace() and using a blank "" value for the replacement should do what you want.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Vladi243

You'll need to write something to suit your needs... StringReplace() / StringRegExpReplace() and using a blank "" value for the replacement should do what you want.

I think you haven't understood me.

Watch this file: a.html

Can AU3 make text like this?

Share this post


Link to post
Share on other sites
Valuater

From Welcome to Autoit 1-2-3

; Read the contents of the body of a webpage and search for a string. If the string is found, replace it 
; with a new string and write it back to the webpage.

#include <IE.au3>

$oIE = _IECreate()
_IENavigate($oIE, "http://www.autoitscript.com/")

$body = _IEBodyReadHTML($oIE)

If StringInStr($body, "automation") Then
    MsgBox(0, "Success", "The string was found")
    $newbody = StringReplace($body, "automation", "<del>This text has been deleted</del>")
    _IEBodyWriteHTML($oIE, $newbody)
Else
    MsgBox(0, "Fail", "The string was NOT found")
EndIf

Exit

Just added your text instead of mine

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×