Sign in to follow this  
Followers 0
beausof

How to replace large amount of text within a webpage

3 posts in this topic

Hello,

 

Just as the title states. How do I replace a large amount of text within a web page with another large amount of text. Pretty much just a copy/paste. I have read and understand how to replace certain strings within a webpage but I need to do this on a larger scale.

 

Any help is greatly appreciated.

 

thanks

 

Share this post


Link to post
Share on other sites



Using _StringBetween() or StringRegExpReplace() you can select the part of text to replace, whatever its size

Share this post


Link to post
Share on other sites

Thanks Mikell,

this seemed to work for me:

#include <IE.au3>

$v="This is a test variable"

$o_IE = _IECreate()
$rc=_IENavigate($o_IE, "Web Page")
$o_field = _IEGetObjById($o_IE, "c2") ; this is the name of the textbox
_IEFormElementSetValue($o_field,$v)   ; paste the variable
$o_submit= _IEGetObjById($o_IE,"c4") ; this is the name of the submit button, In my case there is a submit button
_IEAction($o_submit,"click")  ; click the button
_IELoadWait($o_IE)
_IEQuit($o_IE) <--- closes window but i needed it open so i commented this out

 

Thanks again

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  
Followers 0