Sign in to follow this  
Followers 0
falslev

How To Find A Spec. Text And Copy It

4 posts in this topic

I need an example ther can find some text on a website, highlite it an copy.

The text is allways at the same position.

Ex.

On http://www.autoitscript.com/autoit3/ i want the code to copy this text:

AutoIt v3 is an opensource BASIC-like scripting language designed for automating the Windows GUI. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys).

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

if it is always in the same position, you can use mouseclickdrag() from one set of coords to the next, and then send control+C to copy it into the clipboard, and clipget() to retrive it.

Since I don't know the browser version, what add ons you might have(google toolbar), and if you use text or picture icons, I can't give the exact coords.

One other way is to use URLDownloadToFile() and then read the while file and grab the text that way.

Just make sure the page is loaded before you use the mouse version.

Help file really helps a lot, and use AutoIt spy to find the mouse coordinates.

AutoItSetOption("MouseCoordMode", 0);1 = absolute screen coordinates (default)
winactivate("HiddenSoft")
winwaitactive("HiddenSoft")
send("{pgup 2}")
MouseClickDrag ( "left", 200,455,793,617,0 ) 
send("^c")
msgbox(1,"",clipget())
Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

or...u could use the sting search function..


-Brett

Share this post


Link to post
Share on other sites

Thank you scriptkitty.

That was just the part i needed.

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